@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --ink: #0f2642;
    --ink-soft: #355468;
    --accent: #a98a53;
    --accent-dark: #8d7245;
    --gold: #a98a53;
    --sand: #f5f7fb;
    --peach: #f0ede7;
    --sky: #e6ecf1;
    --card: #ffffff;
    --border: #d9e2ea;
    --shadow: 0 24px 60px rgba(15, 38, 66, 0.08);
}

.ksko-quiz-embed * {
    box-sizing: border-box;
}

.ksko-quiz-embed {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--ink-soft);
    background-color: #0f2642;
    position: relative;
    overflow: hidden;
}

.ksko-quiz-embed .page {
    position: relative;
    z-index: 1;
}

.ksko-quiz-embed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('Graphics/SA Compass Navy Transparent.png'), url('Graphics/SA Compass Navy Transparent.png');
    background-repeat: repeat-y, repeat-y;
    background-size: 70% auto, 70% auto;
    background-position: left 0 top 80px, right 0 top 360px;
    opacity: 0.32;
    pointer-events: none;
    z-index: 0;
}

.ksko-quiz-embed .landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0f2642;
    z-index: -1;
}

.ksko-quiz-embed h1, .ksko-quiz-embed h2, .ksko-quiz-embed h3, .ksko-quiz-embed h4{
    font-family: 'Space Grotesk', sans-serif;
    color: var(--ink);
    margin: 0 0 12px;
}

.ksko-quiz-embed p {
    margin: 0 0 12px;
}

.ksko-quiz-embed a {
    color: var(--accent);
}

.ksko-quiz-embed .page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.ksko-quiz-embed .top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 16px;
    z-index: 40;
    margin-bottom: 24px;
}

.ksko-quiz-embed .brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.ksko-quiz-embed .brand-logo {
    height: 64px;
    width: auto;
    display: block;
}

.ksko-quiz-embed .nav-links {
    display: inline-flex;
    align-items: center;
    gap: 20px;
}

.ksko-quiz-embed .nav-link {
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ksko-quiz-embed .link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.ksko-quiz-embed .hero {
    padding: 40px 0 10px;
    text-align: center;
}

.ksko-quiz-embed .hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.ksko-quiz-embed .pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 18px;
}

.ksko-quiz-embed .accent {
    color: var(--accent);
}

.ksko-quiz-embed .lead {
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto 16px;
}

.ksko-quiz-embed .lead.deadline {
    max-width: 820px;
    white-space: nowrap;
}

.ksko-quiz-embed .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--ink);
}

.ksko-quiz-embed .report-header {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.ksko-quiz-embed .report-header .lead {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.ksko-quiz-embed .about-you-lead {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.ksko-quiz-embed .self-assessment-lead {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.ksko-quiz-embed .invite-lead {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.ksko-quiz-embed .report-subtitle {
    margin-bottom: 12px;
}

.ksko-quiz-embed .report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    background: #f7f9fb;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border);
}

.ksko-quiz-embed .report-meta div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ksko-quiz-embed .meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #7a8aa0;
}

.ksko-quiz-embed .meta-value {
    font-weight: 700;
    color: var(--ink);
}

.ksko-quiz-embed .report-gate {
    border-style: solid;
    background: #fefbf6;
}

.ksko-quiz-embed .gate-actions {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
    margin: 16px 0;
}

.ksko-quiz-embed .gate-actions .form {
    margin: 0;
}

.ksko-quiz-embed .gate-actions label {
    margin-bottom: 8px;
}

.ksko-quiz-embed .hero .meta {
    justify-content: center;
}

.ksko-quiz-embed .admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ksko-quiz-embed .admin-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ksko-quiz-embed .admin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.ksko-quiz-embed .pagination-links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.ksko-quiz-embed .admin-actions .ghost {
    margin-bottom: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ksko-quiz-embed .admin-assessment summary {
    list-style: none;
    cursor: pointer;
}

.ksko-quiz-embed .admin-assessment summary::-webkit-details-marker {
    display: none;
}

.ksko-quiz-embed .admin-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ksko-quiz-embed .admin-summary h2 {
    margin-bottom: 8px;
}

.ksko-quiz-embed .admin-summary .report-token {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-left: 10px;
    word-break: break-all;
}

.ksko-quiz-embed .admin-summary-meta {
    margin-bottom: 0;
}

.ksko-quiz-embed .admin-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ksko-quiz-embed .admin-details {
    margin-top: 16px;
}

.ksko-quiz-embed .admin-code-list {
    display: grid;
    gap: 16px;
}

.ksko-quiz-embed .admin-code-item h2 code {
    font-size: 1.1rem;
}

.ksko-quiz-embed .admin-invite-actions, 
.ksko-quiz-embed .admin-code-actions {
    display: grid;
    gap: 8px;
    align-items: center;
}

.ksko-quiz-embed .admin-invite-actions input, 
.ksko-quiz-embed .admin-code-actions input {
    min-width: 220px;
}

.ksko-quiz-embed .bonus-code {
    display: grid;
    gap: 8px;
    margin: 12px 0 16px;
}

.ksko-quiz-embed .bonus-code summary {
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.ksko-quiz-embed .bonus-code summary::-webkit-details-marker {
    display: none;
}

.ksko-quiz-embed .invite-more-title {
    margin: 12px 0 8px;
    font-size: 1.05rem;
    color: var(--ink);
}

.ksko-quiz-embed .paid-block {
    display: grid;
    gap: 16px;
    margin-bottom: 12px;
}

.ksko-quiz-embed .paid-block input:disabled {
    background: #f1f2f5;
    color: #94a3b8;
    cursor: not-allowed;
}

.ksko-quiz-embed .paid-rows-locked {
    display: none;
}

.ksko-quiz-embed .paid-unlock-prompt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 0 8px;
}

.ksko-quiz-embed .paid-unlock-prompt.hidden {
    display: none;
}

.ksko-quiz-embed .bonus-code-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    max-width: 420px;
}

.ksko-quiz-embed .bonus-code-row input {
    flex: 1 1 220px;
    max-width: 260px;
}

.ksko-quiz-embed .bonus-code-row .ghost[data-bonus-apply] {
    background: #a98a53;
    color: #fff;
    border-color: #a98a53;
}

.ksko-quiz-embed .add-person {
    background: #a98a53;
    color: #fff;
    border-color: #a98a53;
    font-size: 1.05rem;
    padding: 12px 20px;
}

.ksko-quiz-embed .bonus-code .error {
    color: #b91c1c;
}

.ksko-quiz-embed .wysiwyg {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.ksko-quiz-embed .wysiwyg-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ksko-quiz-embed .wysiwyg-editor {
    min-height: 160px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
}

.ksko-quiz-embed .wysiwyg-editor:focus {
    outline: 2px solid rgba(15, 38, 66, 0.18);
    outline-offset: 2px;
}

.ksko-quiz-embed .wysiwyg-input {
    display: none;
}


.ksko-quiz-embed .card {
    background: var(--card);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid #a98a53;
    margin-bottom: 24px;
}

.ksko-quiz-embed .card.info {
    border: 1px solid var(--border);
    background: #c49d62;
}

#contact-more {
    color: #ffffff;
}

#contact-more h2, 
#contact-more label, 
#contact-more p {
    color: #ffffff;
}

.ksko-quiz-embed .card.highlight {
    border-left: 6px solid var(--accent);
}

.ksko-quiz-embed .card.inset {
    background: #ffffff;
    border: 1px dashed var(--border);
    padding: 16px;
}

.ksko-quiz-embed .step-section[data-step="1"] .card.inset {
    background: #ffffff;
    border: 1px solid #a98a53;
}

.ksko-quiz-embed .step-section[data-step="2"] .card.inset {
    border: 1px solid #a98a53;
}

.ksko-quiz-embed .quiz-reference-card {
    border-color: #355468;
    background: #fff9ed;
}

.ksko-quiz-embed .white-card {
    background: #ffffff;
}

.ksko-quiz-embed .white-card.quiz-reference-card {
    background: #fff9ed;
}

.ksko-quiz-embed .regular-label {
    font-weight: 400;
}

.ksko-quiz-embed .about-you-bold label {
    font-weight: 700;
}

.ksko-quiz-embed .label-bold {
    font-weight: 700;
}

.ksko-quiz-embed .highlight-field {
    border: 1px solid #a98a53;
    border-radius: 14px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(169, 138, 83, 0.2);
}

.ksko-quiz-embed .highlight-field input {
    margin-top: 8px;
    font-weight: 600;
}

.ksko-quiz-embed .about-copy p {
    margin: 0 0 16px;
    line-height: 1.7;
}

.ksko-quiz-embed .about-copy .intro-book {
    width: 110px;
    height: auto;
    display: inline-block;
}

.ksko-quiz-embed .about-copy .intro-book-float {
    float: right;
    margin: 0 0 8px 16px;
}

.ksko-quiz-embed .about-copy .intro-book-center {
    text-align: center;
    margin: 16px 0 24px;
}

.ksko-quiz-embed .about-copy .intro-book-center .intro-book {
    width: 180px;
    max-width: 100%;
    height: auto;
}

.ksko-quiz-embed .confirmation-book .intro-book {
    width: 600px;
    max-width: 50%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.ksko-quiz-embed .journal-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: nowrap;
    width: 40%;
    max-width: 40%;
    margin: 12px 0 20px;
    margin-left: auto;
    margin-right: auto;
}

.ksko-quiz-embed .journal-links a {
    flex: 1 1 0;
}

.ksko-quiz-embed .journal-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 640px) {
    .ksko-quiz-embed .confirmation-book .intro-book {
        max-width: 85%;
    }

    .ksko-quiz-embed .journal-links {
        width: 68%;
        max-width: 68%;
        margin-left: auto;
        margin-right: auto;
    }
}

.ksko-quiz-embed .about-copy .intro-book-paragraph::after {
    content: "";
    display: block;
    clear: both;
}

.ksko-quiz-embed .about-copy p:last-child {
    margin-bottom: 0;
}

.ksko-quiz-embed .about-copy h3 {
    margin: 24px 0 12px;
}

.ksko-quiz-embed .about-copy hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.ksko-quiz-embed .about-copy ul {
    margin: 12px 0 16px;
}

.ksko-quiz-embed .about-copy li {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}

.ksko-quiz-embed .about-list {
    list-style: none;
    padding: 0 12rem 0 3rem;
    margin: 0;
}

.ksko-quiz-embed .about-badge {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 0.68rem;
    line-height: 1;
    color: var(--badge-text);
    background: var(--badge-bg);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.65);
    padding: 0 8px;
}

.ksko-quiz-embed .notice {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.ksko-quiz-embed .notice.success {
    background: #eaf5ec;
    color: #2b5a2c;
}

.ksko-quiz-embed .notice.error {
    background: #fbe9e7;
    color: #7a3d36;
}

.ksko-quiz-embed .notice.info {
    background: #eef4ff;
    color: #2e3e6e;
}

.ksko-quiz-embed .inline-error {
    display: none;
    margin: 12px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fde8e8;
    color: #9b2c2c;
    list-style: disc;
}

.ksko-quiz-embed .inline-error.show:empty {
    display: none;
}

.ksko-quiz-embed .inline-error.show li {
    margin-left: 20px;
}

.ksko-quiz-embed .inline-error.show {
    display: block;
}

.ksko-quiz-embed .form label {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    gap: 8px;
    margin-bottom: 16px;
}

.ksko-quiz-embed .form input, 
.ksko-quiz-embed .form textarea {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 1rem;
    font-family: inherit;
}

.form input:focus,
.ksko-quiz-embed .form textarea:focus {
    outline: 2px solid rgba(79, 70, 229, 0.2);
    border-color: var(--accent);
}

.form input::placeholder,
.ksko-quiz-embed .form textarea::placeholder {
    font-style: italic;
}

.ksko-quiz-embed .grid.two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.ksko-quiz-embed .grid.three {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.ksko-quiz-embed .scores {
    display: grid;
    gap: 18px;
    margin: 24px 0;
}

.ksko-quiz-embed input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    background: transparent;
    -webkit-appearance: none;
}

.ksko-quiz-embed input[type="range"]::-webkit-slider-thumb {
    background-color: var(--ink-soft);
    border: none;
    box-shadow: 0 0 0 4px rgba(53, 84, 104, 0.2);
    height: 24px;
    width: 24px;
    border-radius: 50%;
    -webkit-appearance: none;
    margin-top: -8px;
}

.ksko-quiz-embed input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: #d5d5d5;
}

.ksko-quiz-embed input[type="range"]::-moz-range-thumb {
    background-color: var(--ink-soft);
    border: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(53, 84, 104, 0.2);
}

.ksko-quiz-embed input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: #d5d5d5;
}

.ksko-quiz-embed input[type="range"]::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    background: #111;
}

.ksko-quiz-embed output {
    min-width: 24px;
    font-weight: 700;
    color: var(--ink);
}

.ksko-quiz-embed .primary, 
.ksko-quiz-embed .secondary, 
.ksko-quiz-embed .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 26px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    height: 52px;
    margin-top: 0;
    line-height: 1;
    box-sizing: border-box;
    text-decoration: none;
}

.ksko-quiz-embed .primary {
    background: var(--ink);
    color: #fff;
}

.ksko-quiz-embed .secondary {
    background: var(--gold);
    color: #fff;
}

#contact-more .secondary {
    background: #355468;
}

.ksko-quiz-embed .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.2);
    line-height: 1;
}

.ksko-quiz-embed .btn.ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--border);
    box-shadow: none;
    line-height: 1;
}

.ksko-quiz-embed .hero-assessments, 
.ksko-quiz-embed .hero-actions .hero-assessments {
    background: #355468;
    color: #ffffff;
    border-color: #355468;
}

.ksko-quiz-embed .btn.primary {
    background: var(--accent);
    color: #fff;
}

.ksko-quiz-embed .btn.light {
    background: #fff;
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.ksko-quiz-embed .hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 24px 0;
}

.ksko-quiz-embed .hero-actions .btn {
    min-width: 220px;
}

.ksko-quiz-embed .step-actions .btn {
    min-width: 200px;
}

.ksko-quiz-embed .landing {
    display: block;
}

.ksko-quiz-embed .landing .hero {
    background: #0f2642;
    border-radius: 28px;
    padding: 36px;
    color: #ffffff;
}

.ksko-quiz-embed .landing .hero h1 {
    font-size: clamp(1.9rem, 3.4vw, 2.8rem);
    line-height: 1.1;
}

.ksko-quiz-embed .landing .hero h1, 
.ksko-quiz-embed .landing .hero p, 
.ksko-quiz-embed .landing .hero .meta {
    color: #ffffff;
}

.ksko-quiz-embed .landing .hero .meta {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.ksko-quiz-embed .assessment-shell {
    display: none;
}

.ksko-quiz-embed .page.show-assessment .landing {
    display: none;
}

.ksko-quiz-embed .page.show-assessment .assessment-shell {
    display: block;
}

.ksko-quiz-embed .page.show-assessment #report-access {
    display: none;
}

.ksko-quiz-embed .step-only {
    display: none;
}

.ksko-quiz-embed .stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, 1.2vw, 10px);
    margin: 0 0 24px;
    flex-wrap: nowrap;
    width: 100%;
}

.ksko-quiz-embed .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    color: #98a1b8;
    cursor: pointer;
    flex: 1 1 0;
    min-width: clamp(40px, 7vw, 88px);
    justify-content: flex-start;
    min-height: 80px;
}

.ksko-quiz-embed .step-label {
    text-align: center;
    width: 100%;
}

.ksko-quiz-embed .step-circle {
    width: clamp(34px, 5.5vw, 46px);
    height: clamp(34px, 5.5vw, 46px);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e6eaf2;
    color: #9aa4bb;
    font-weight: 700;
}

.ksko-quiz-embed .step-line {
    flex: 1 1 0;
    min-width: clamp(4px, 3vw, 50px);
    height: 2px;
    background: #e6eaf2;
}

.ksko-quiz-embed .step.active .step-circle {
    background: var(--accent);
    color: #fff;
}

.ksko-quiz-embed .step.completed .step-circle {
    background: #c7d2fe;
    color: var(--accent);
}

.ksko-quiz-embed .step-section {
    display: none;
    animation: fadeUp 0.4s ease;
}

.ksko-quiz-embed .step-section.active {
    display: block;
}

.ksko-quiz-embed .step-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.ksko-quiz-embed .score-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.ksko-quiz-embed .score-title {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.ksko-quiz-embed .score-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 0;
}

.ksko-quiz-embed .score-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--badge-bg);
    opacity: 0.25;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.6);
}

.ksko-quiz-embed .score-badge span {
    position: relative;
    font-weight: 700;
    color: var(--badge-text);
    opacity: 0.7;
    padding: 0 12px;
    line-height: 1.1;
    font-size: 0.62rem;
}

.ksko-quiz-embed .score-bar, 
.ksko-quiz-embed .score-scale {
    position: relative;
    z-index: 1;
}

.ksko-quiz-embed .score-bar {
    position: relative;
    padding-top: 28px;
}

.ksko-quiz-embed .score-scale {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 8px;
}

.ksko-quiz-embed .score-scale span:last-child {
    text-align: right;
}

.ksko-quiz-embed .score-value {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25);
    margin: 0 16px;
}

.ksko-quiz-embed .invite-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #355468;
    color: #fff;
    font-weight: 600;
    margin-bottom: 20px;
}

.ksko-quiz-embed .invite-badge-ok {
    background: #355468;
}

.ksko-quiz-embed .invite-badge-warn {
    background: #b42318;
}

.ksko-quiz-embed .invite-badge-right {
    margin-left: auto;
}

.ksko-quiz-embed .invite-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ksko-quiz-embed .invite-head .invite-lead {
    margin: 0;
}

.ksko-quiz-embed .invite-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    background: #fff;
    margin-bottom: 20px;
}

.ksko-quiz-embed .invite-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
}

.ksko-quiz-embed .add-person {
    width: 100%;
    justify-content: center;
    margin-top: 12px;
    margin-bottom: 0;
}

.ksko-quiz-embed .paid-cart-summary {
    cursor: default;
    margin-top: 0;
    background: #355468;
    color: #fff;
    border-color: #355468;
    border-radius: 999px;
}

.ksko-quiz-embed .paid-cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.ksko-quiz-embed .paid-checkout {
    background: #355468;
    color: #ffffff;
    border-color: #355468;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 600;
}

.ksko-quiz-embed .paid-action {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.ksko-quiz-embed .paid-add[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.ksko-quiz-embed .add-rater {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
    font-size: 1.05rem;
    background: #a98a53;
    color: #fff;
    border-color: #a98a53;
}

.ksko-quiz-embed .paid-add {
    font-size: 1.05rem;
    background: #a98a53;
    color: #fff;
    border-color: #a98a53;
}

.ksko-quiz-embed .invite-section-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-soft);
    margin: 8px 0 4px;
}

.ksko-quiz-embed .invite-section {
    border: 1px solid #a98a53;
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.ksko-quiz-embed .buy-section {
    background: #cbe3f2;
}

.ksko-quiz-embed .add-person.flash {
    box-shadow: 0 0 0 3px rgba(169, 138, 83, 0.35);
}

.ksko-quiz-embed .rater-row.flash {
    box-shadow: 0 0 0 3px rgba(169, 138, 83, 0.35);
    border-radius: 16px;
    padding: 8px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ksko-quiz-embed .how-it-works {
    text-align: center;
    margin: 40px 0 20px;
    padding: 0 16px;
}

.ksko-quiz-embed .steps-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ksko-quiz-embed .step-card {
    background: #fff;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--border);
    text-align: left;
}

.ksko-quiz-embed .icon-chip {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 1.1rem;
}

.ksko-quiz-embed .icon-chip.blue {
    background: #a98a53;
    color: #fff;
}

.ksko-quiz-embed .icon-chip.green {
    background: #a98a53;
    color: #fff;
}

.ksko-quiz-embed .icon-chip.gold {
    background: #a98a53;
    color: #fff;
}

.ksko-quiz-embed .hero-compass {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    margin: -2px auto 20px;
    display: flex;
    justify-content: center;
    border: 1px solid var(--border);
    max-width: 360px;
    min-height: 220px;
    margin-left: auto;
    margin-right: auto;
}

.ksko-quiz-embed .hero-compass-image {
    max-width: 100%;
    height: auto;
    max-height: 180px;
}

.ksko-quiz-embed .rater-compass {
    display: flex;
    justify-content: center;
    margin: 24px 0 12px;
}

.ksko-quiz-embed .cta-bar {
    margin: 40px 0 24px;
    padding: 22px 24px;
    border-radius: 20px;
    background: linear-gradient(120deg, #0f172a, #1e293b);
    color: #c49d62;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ksko-quiz-embed .cta-bar .cta-copy {
    width: 100%;
    text-align: center;
}

.ksko-quiz-embed .how-it-works h2 {
    color: #ffffff;
}

.ksko-quiz-embed .ghost:not(.btn) {
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    height: 52px;
    line-height: 52px;
    box-sizing: border-box;
}

.ksko-quiz-embed .paid-hidden {
    display: none;
}

.ksko-quiz-embed .free-hidden {
    display: none;
}

.ksko-quiz-embed .rater-row.paid.paid-hidden {
    display: none;
}

.ksko-quiz-embed select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 1rem;
    font-family: inherit;
}

.ksko-quiz-embed .rater-row input[disabled] {
    background: #f1f3f8;
    color: #7a8097;
    cursor: not-allowed;
}

.ksko-quiz-embed .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 42, 91, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
}

.ksko-quiz-embed .modal-overlay.open {
    display: flex;
}

.ksko-quiz-embed .modal {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow);
    position: relative;
}

.ksko-quiz-embed .modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ksko-quiz-embed .close-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ksko-quiz-embed .score-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    color: #667085;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.ksko-quiz-embed .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.ksko-quiz-embed .modal-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--ink);
}

.ksko-quiz-embed .modal-loading.show {
    display: flex;
}

.ksko-quiz-embed .small {
    font-size: 0.9rem;
    color: #5f667f;
}

.ksko-quiz-embed .cost {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
}

.ksko-quiz-embed .checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.ksko-quiz-embed .chart-wrap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.ksko-quiz-embed .chart-wrap canvas {
    max-width: 100%;
    background: #fdfdfd;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--border);
}

.ksko-quiz-embed .chart-title {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--ink);
    font-size: 0.95rem;
    text-align: center;
    max-width: 90%;
}

.ksko-quiz-embed .chart-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    font-weight: 700;
    color: var(--ink);
}

.ksko-quiz-embed .legend {
    display: flex;
    gap: 16px;
    align-items: center;
    font-weight: 500;
}

.ksko-quiz-embed .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ksko-quiz-embed .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.ksko-quiz-embed .dot.self {
    background: var(--ink);
}

.ksko-quiz-embed .dot.peer {
    background: var(--gold);
}

.ksko-quiz-embed table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 12px;
}

.ksko-quiz-embed .inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.ksko-quiz-embed .inline-form label {
    flex: 1 1 280px;
}

.ksko-quiz-embed th, .ksko-quiz-embed td{
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.ksko-quiz-embed th {
    color: var(--ink);
}

@media (max-width: 720px) {
    .ksko-quiz-embed .page {
        padding-left: 4px;
        padding-right: 4px;
    }

    .ksko-quiz-embed .step-actions {
        flex-direction: column-reverse;
    }

    .ksko-quiz-embed .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        position: static;
    }

    .ksko-quiz-embed .nav-links {
        width: 100%;
        justify-content: flex-end;
    }

    .ksko-quiz-embed .nav-link {
        font-size: 0.95rem;
    }

    .ksko-quiz-embed .stepper {
        display: none;
    }

    .ksko-quiz-embed .step {
        flex: 1 0 33%;
        min-width: 90px;
    }

    .ksko-quiz-embed .step-label {
        font-size: 0.8rem;
        text-align: center;
    }

    .ksko-quiz-embed .score-card {
        padding: 16px;
    }

    .ksko-quiz-embed .score-title {
        padding-right: 72px;
    }

    .ksko-quiz-embed .score-badge {
        top: 6px;
        right: 8px;
        width: 58px;
        height: 58px;
    }

    .ksko-quiz-embed .score-badge {
        display: none;
    }

    .ksko-quiz-embed .score-badge span {
        font-size: 0.55rem;
    }

    .ksko-quiz-embed .score-bar {
        padding-top: 20px;
    }

    .ksko-quiz-embed .score-scale {
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 8px;
    }

    .ksko-quiz-embed .score-scale span:last-child {
        text-align: right;
    }

    .ksko-quiz-embed .score-value {
        margin: 0 12px;
    }

    .ksko-quiz-embed .lead {
        font-size: 1rem;
    }

    .ksko-quiz-embed .legend {
        flex-direction: column;
        align-items: flex-start;
    }

    .ksko-quiz-embed .cta-bar {
        text-align: center;
        justify-content: center;
    }

    .ksko-quiz-embed .inline-form {
        align-items: stretch;
    }

    .ksko-quiz-embed .invite-header {
        grid-template-columns: 1fr;
    }

    .ksko-quiz-embed .grid.three {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ksko-quiz-embed .grid.three .paid-action {
        margin-top: 4px;
    }

    .ksko-quiz-embed .grid.three .paid-action button {
        width: 100%;
    }

    .ksko-quiz-embed .paid-cart-actions {
        flex-direction: column;
        gap: 12px;
    }

    .ksko-quiz-embed .paid-cart-summary {
        text-align: center;
    }

    .ksko-quiz-embed .paid-checkout {
        width: 100%;
    }

    .ksko-quiz-embed .step-line {
        display: none;
    }

    .ksko-quiz-embed .about-list {
        padding: 0;
    }

    .ksko-quiz-embed .about-copy .intro-book {
        width: 120px;
        float: none;
        display: block;
        margin: 12px auto 0;
    }
}

/* WordPress shortcode embedded context overrides */
.ksko-quiz-embed:has(.page.embedded) {
    background: transparent;
    overflow: visible;
}

.ksko-quiz-embed:has(.page.embedded)::before {
    display: none;
}

/* WordPress admin context overrides */
.wrap .ksko-quiz-embed {
    background: transparent;
    overflow: visible;
}

.wrap .ksko-quiz-embed::before {
    display: none;
}

.wrap .ksko-quiz-embed .page {
    max-width: none;
    padding: 0;
}

.wrap .ksko-quiz-embed .card {
    position: static !important;
    margin-top: 0 !important;
    padding: 24px !important;
    min-width: 0 !important;
    max-width: none !important;
    background: var(--card) !important;
    border-radius: 18px !important;
    box-shadow: var(--shadow) !important;
    border: 1px solid #a98a53 !important;
    margin-bottom: 24px !important;
}

.wrap .ksko-quiz-embed .card.inset {
    background: #ffffff !important;
    border: 1px dashed var(--border) !important;
    padding: 16px !important;
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ── Dashboard ─────────────────────────────────────────────────────────── */

.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 20px 0 24px;
}

.dash-stat {
    background: var(--sand);
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid var(--border);
}

.dash-stat-accent {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.dash-stat-accent .dash-stat-label,
.dash-stat-accent .dash-stat-sub {
    color: rgba(255,255,255,0.7);
}

.dash-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
}

.dash-stat-accent .dash-stat-value {
    color: #fff;
}

.dash-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-stat-sub {
    font-size: 0.75rem;
    color: var(--ink-soft);
    margin-top: 2px;
}

.dash-stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}

.dash-stat-trend.up   { color: #2a7f4f; }
.dash-stat-trend.down { color: #b94040; }

/* Trend + locations row */
.dash-row {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 760px) {
    .dash-row { grid-template-columns: 1fr; }
}

.dash-panel { margin: 0; }

/* Bar chart */
.dash-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 140px;
    padding-top: 24px;
}

.dash-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.dash-bar-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 4px;
    min-height: 16px;
}

.dash-bar-track {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}

.dash-bar-fill {
    width: 100%;
    background: var(--accent);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height 0.3s ease;
}

.dash-bar-label {
    font-size: 0.65rem;
    color: var(--ink-soft);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
}

/* Locations */
.dash-locations {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.dash-loc-row {
    display: grid;
    grid-template-columns: 110px 1fr 28px;
    align-items: center;
    gap: 8px;
}

.dash-loc-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-loc-bar-track {
    background: var(--border);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.dash-loc-bar-fill {
    height: 100%;
    background: var(--ink);
    border-radius: 4px;
    min-width: 4px;
}

.dash-loc-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-align: right;
}

/* Variance table */
.dash-variance-table-wrap {
    margin-top: 12px;
    overflow-x: auto;
}

.dash-variance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.dash-variance-table th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--border);
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;
}

.dash-variance-table th:first-child {
    text-align: left;
}

.dash-variance-table thead tr:first-child th {
    border-bottom: none;
    padding-bottom: 2px;
}

.dash-variance-table thead tr:last-child th {
    padding-top: 2px;
    border-bottom: 2px solid var(--border);
}

.dash-variance-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--sand);
}

.dash-variance-table tbody tr:last-child td {
    border-bottom: none;
}

.dash-variance-label {
    font-size: 0.82rem;
    color: var(--ink);
    min-width: 120px;
}

.dash-variance-num {
    font-weight: 600;
    color: var(--ink);
    text-align: center;
}

.dash-variance-delta {
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.dash-variance-delta.pos { color: #b94040; }
.dash-variance-delta.neg { color: #2a7f4f; }

.dash-variance-bar-wrap {
    background: var(--border);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    min-width: 80px;
}

.dash-variance-bar {
    height: 100%;
    border-radius: 4px;
    min-width: 2px;
}

.dash-variance-bar.pos { background: #b94040; }
.dash-variance-bar.neg { background: #2a7f4f; }


/* ── Admin popup modal ─────────────────────────────────────────────────────── */

.ksko-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ksko-popup-box {
    position: relative;
    width: 100%;
    max-width: 960px;
    height: 85vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}

.ksko-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.ksko-popup-close:hover { background: #f0f0f0; }

.ksko-popup-iframe {
    width: 100%;
    flex: 1;
    border: none;
}
