:root {
    --blue: #3B82F6;
    --blue-700: #1D4ED8;
    --blue-600: #2563EB;
    --border: #E5E7EB;
    --muted: #6b7280;
    --bg: #f5f5f5;
    --txt: #111827;
}

html,
body {
    height: 100%;
}

/* LÅT DEN HÄR VARA SOM FÖRUT, men med overflow-x: hidden; */
body {
    background: var(--bg);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    margin: 0;
    color: var(--txt);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--txt);
    margin-top: 0;
}

h1 {
    font-size: 50px;
    font-weight: 700;
    margin: 0 0 16px;
}

h2 {
    font-size: 34px;
    font-weight: 600;
}

h3 {
    font-size: 26px;
    font-weight: 600;
}

h4 {
    font-size: 20px;
    font-weight: 500;
}

h5 {
    font-size: 18px;
    font-weight: 500;
}

h6 {
    font-size: 16px;
    font-weight: 500;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 16px
}

.panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
}

.main_content_p_test {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    border: 1px solid #f0f0f0;
}

.main_content_p_test_700 {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    border: 1px solid #f0f0f0;
}

.logo {
    vertical-align: middle;
    width: 120px;
    height: auto
}

.logo-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px
}

/* Buttons */
:root {
    --blue: #0071BC;
    /* din huvudfärg */
    --blue-hover: #8DC63F;
    /* mörkare blå, korrekt hover */
}

.btn_quote {
    display: inline-block;
    padding: 14px 26px;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 17px;
    background: var(--blue);
    color: #fff;
    margin-bottom: 20px;
}

.btn_quote:hover {
    background: var(--blue-hover);
}

/* Radio list */
ul.radio {
    list-style: none;
    padding: 0;
    margin: 0
}

ul.radio li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
    cursor: pointer;
    background: #fff;
}

ul.radio li:hover {
    border-color: #93C5FD
}

ul.radio input[type="radio"] {
    accent-color: var(--blue-600)
}

ul.radio li:has(input[type="radio"]:checked) {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .12) inset;
}

/* Tooltip */
.custom-tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
}

.custom-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 100;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    max-width: 80vw;
    background: #fff;
    color: var(--txt);
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 16px 18px;
    line-height: 1.45;
    font-size: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
    transition: opacity .2s ease;
    pointer-events: none;
}

.custom-tooltip-container:hover .custom-tooltip {
    visibility: visible;
    opacity: 1;
    transition-delay: 1.5s;
}

/* Hover/touch hints */
.hover-hint {
    display: none
}

.touch-hint {
    display: none
}

@media (hover:hover) and (pointer:fine) {
    .hover-hint {
        display: block
    }
}

@media (hover:none),
(pointer:coarse) {
    .touch-hint {
        display: block
    }
}

/* Visibility helpers */
.is-visible {
    display: block !important
}

.is-hidden {
    display: none !important
}

.hidden {
    display: none !important
}

/* Spacer */
.spacer-16 {
    height: 16px
}

/* Modal (gemensam) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .35);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    z-index: 1000;
}

.modal {
    width: min(520px, 90vw);
    background: #fff;
    border-radius: 20px;
    padding: 22px 22px 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    border: 1px solid rgba(0, 0, 0, .06);
    animation: modalIn .12s ease-out;
}

@keyframes modalIn {
    from {
        transform: translateY(6px);
        opacity: .96
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px
}

.modal-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .12);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #2563eb;
    font-family: ui-sans-serif, system-ui;
    line-height: 1;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0
}

.modal-body {
    font-size: 16px;
    color: #111827;
    margin: 4px 0 14px
}

.modal-actions {
    display: flex;
    justify-content: flex-end
}

.modal-btn {
    padding: 14px 26px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 17px;
    background: var(--blue);
    color: #fff;
    min-width: 96px;
}

.modal-btn:hover {
    background: var(--blue-700)
}

.modal-backdrop.show {
    display: flex
}

/* Frågetext större i premium/premium_ai listor */
.q>label strong {
    font-size: 18px;
    line-height: 1.5;
    display: block;
    margin-bottom: 8px;
}

/* Smoooooth collapse/expand — (behåll denna version) */
.q {
    overflow: hidden;
    transition: height .42s cubic-bezier(.22, .61, .36, 1),
        opacity .32s ease,
        transform .32s ease;
    height: auto;
    opacity: 1;
    transform: translateY(0);
}

.q.is-hidden {
    height: 0;
    opacity: 0;
    transform: translateY(6px);
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
}

/* respekt för användare som vill minska rörelser */
@media (prefers-reduced-motion: reduce) {
    .q {
        transition: none
    }
}

/* Result header — GLOBAL HEADER FIX (behåll bara denna) */
.result-header {
    width: 100%;
    background: linear-gradient(38deg, #0071BC 0%, #8DC63F 100%);
    color: #fff;
    /* Lås höjden lika överallt */
    min-height: 120px;
    padding: 0;
    /* vi centrerar istället med flex */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* exakt samma vertikala höjd oavsett titel/subtitel */
}

.result-header-title {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
    font-size: 38px;
    color: #fff;
}

.result-header-subtitle {
    margin-top: 6px;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.35;
    color: #fff;
}

.result-header--core {
    margin-bottom: 20px
}

/* AI titles (behåll denna kompletta version) */
.ai-title {
    text-align: center;
    line-height: 1.35;
    margin: 0 0 12px
}

.ai-title-main {
    display: block;
    font-weight: 800;
    font-size: 22px
}

.ai-title-sub {
    display: block;
    font-weight: 400;
    font-size: 16px;
    color: var(--muted);
    margin-top: 4px
}

/* Navigation/progress */
.qnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.btn-nav {
    appearance: none;
    border: 1px solid var(--border);
    background: #fff;
    color: #111827;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: box-shadow .15s, border-color .15s;
}

.btn-nav:hover {
    border-color: #93C5FD;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .10)
}

.btn-nav:disabled {
    opacity: .5;
    cursor: not-allowed
}

.qstatus {
    min-width: 140px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f7f8fa;
    border: 1px solid var(--border);
    font-weight: 800;
    letter-spacing: .02em;
}

.qstatus .sep {
    opacity: .6
}

.qprog {
    height: 6px;
    background: #eef2f7;
    border-radius: 999px;
    margin: 10px 0 16px
}

.qprog #qBar {
    height: 100%;
    width: 0%;
    background: var(--blue);
    border-radius: 999px;
    transition: width .25s ease;
}

/* Textarea */
.ta {
    width: 100%;
    box-sizing: border-box;
    min-height: 120px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px;
    font: inherit;
    resize: vertical;
    max-width: 100%;
    overflow: auto;
}

/* Word count */
.word-count {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    text-align: right
}

.word-count.limit {
    color: #EF4444;
    font-weight: 600
}

/* Premium AI-knapp */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1.25;
    text-decoration: none;
}

/* gemensam hover för alla .btn-varianter */
.btn:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 10px rgba(16, 24, 40, .08);
    transform: translateY(-1px);
}

.btn--premium-ai {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #4c1d95
}

.btn--premium-ai:hover {
    border-color: #a78bfa;
}

/* Extended – blå knapp */
.btn--extended {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e3a8a;
}

/* Premium – gul knapp */
.btn--premium {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.btn--premium:hover {
    border-color: #f59e0b;
}

/* Basic / Free – turkosblå */
.btn--basic {
    background-color: #E0F7FA;
    border: 1px solid #00ACC1;
    color: #006064;
}

.btn--basic:hover {
    background-color: #A5E3EB;
    border-color: #0097A7;
}

/* Länk-variant av knappen */
.btn.btn--link {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 8px 10px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none
}

/* Helpers */
.is-gone {
    visibility: hidden
}

/* === Intro / Masked ID common styling === */

.intro-actions {
    margin-top: 18px;
    text-align: center;
}

.intro-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

/* Rad med input + knapp */
#idInputBox {
    /* JS sätter display:flex när den visas */
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 12px auto 0;
    max-width: 560px;
    padding: 6px 0;
}

#maskedIdInput {
    box-sizing: border-box;
    max-width: 320px;
    width: 60%;
    min-width: 240px;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #C6D1E0;
    /* lite mjukare */
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

#maskedIdInput::placeholder {
    color: #9CA3AF;
}

#maskedIdInput:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

#useIdBtn {
    height: 42px;
    /* samma höjd som input */
    line-height: 42px;
    padding: 0 16px;
    border-radius: 50px;
    margin-left: 0;
    /* styrs av gap ovan */
}

/* Sekundär trigger som länk – låg vikt */
.id-link {
    background: none;
    border: none;
    color: #6B7280;
    font-weight: 600;
    text-decoration: underline;
    padding: 6px 0;
    cursor: pointer;
}

.id-link:hover {
    color: #374151;
    text-decoration: underline;
}

.intro-actions {
    margin-top: 18px;
    text-align: center;
}

.intro-buttons {
    display: flex;
    justify-content: center;
}

/* sekundär länk */
.id-link {
    background: none;
    border: none;
    color: #4B5563;
    font-size: 0.95rem;
    text-decoration: underline;
    cursor: pointer;
}

.id-link:hover {
    color: #1E3A8A;
}

/* ID-input rad */
#idInputBox {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 12px auto 0;
    max-width: 500px;
}

#maskedIdInput {
    box-sizing: border-box;
    height: 38px;
    padding: 8px 10px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 15px;
    width: 250px;
}

#maskedIdInput:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .1);
}

/* knapp för “Use ID” */
#useIdBtn {
    height: 38px;
    line-height: 38px;
    padding: 0 14px;
    border-radius: 50px;
    font-weight: 600;
}

/* hint under */
.id-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6B7280;
}

.faq-link {
    color: #2563EB;
    text-decoration: underline;
}

.faq-link:hover {
    color: #1E40AF;
    text-decoration: none;
}

/* mobil */
@media (max-width: 560px) {
    #idInputBox {
        flex-direction: column;
        align-items: stretch;
    }

    #maskedIdInput,
    #useIdBtn {
        width: 100%;
    }
}

/* === Small button size helper (behåller din estetik) === */
.btn--sm {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.1;
    border-radius: 8px;
}

/* ===== Secondary red button (Used for ID/info buttons etc.) ===== */
.btn--secondary,
.info-faq {
    background-color: #FDEDED;
    /* ljus rödrosa bakgrund */
    border: 1px solid #E24E4E;
    /* röd kant */
    color: #991B1B;
    /* mörkröd text */
    font-weight: 600;
    font-size: 15px;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn--secondary:hover,
.info-faq:hover {
    background-color: #FECACA;
    /* djupare vid hover */
    border-color: #DC2626;
    color: #7F1D1D;
}

/* Texten under knappen */
#maskedIdHelpTop {
    display: block;
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: #444;
    text-decoration: underline;
}

#maskedIdHelpTop:hover {
    color: #222;
}



/* =========================
   Microtest Result Layout
   ========================= */

.micro-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 32px;
}


/* Särskild stil för Strength / Blind Spot rubriker */
.micro-result-card h2 {
    color: #222;
    margin-top: 30px;
    /* lite mer luft ovanför */
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Lite mindre stil för underrubriker (profilnamn) */
.micro-result-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.micro-result-card:first-of-type {
    line-height: 1.8;
}

/* =========================
   Microtest Print (Safari-safe)
   ========================= */

@media print {

    /* göm print-knapp och annat som inte ska med */
    .btn-print,
    .no-print {
        display: none !important;
    }

    /* fix för Safari – ingen låst 100%-höjd vid utskrift */
    html,
    body {
        height: auto !important;
    }

    /* stabil vit bakgrund på kortet vid utskrift */
    .main_content_p_test,
    .micro-result-card {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* header-texter svarta i print (oavsett gradient) */
    .result-header-title,
    .result-header-subtitle {
        color: #000000 !important;
    }
}

.micro-meta {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.micro-meta__label-block {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.micro-meta__code-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.micro-meta__code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
}

.btn-copy-refcode {
    padding: 4px 10px;
    font-size: 0.8rem;
}


.wrapper-1140 {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

.wrapper-800 {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.wrapper-600 {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.mt-action-card-600 {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   EQUIPIDO – MOBILE TYPOGRAPHY STANDARD
   Gäller alla testsidor (max-width: 768px)
   ========================================== */

@media (max-width: 768px) {

    /* 1) HERO-HEADERS (Results & Summary Hub, Core result mm.) */
    .result-header--core h1,
    .result-header--red h1,
    .result-header--blue h1,
    .result-header--yellow h1,
    .result-header--green h1 {
        font-size: 26px;
        line-height: 1.25;
        margin: 0 0 4px 0;
    }

    .result-header--core p,
    .result-header--red p,
    .result-header--blue p,
    .result-header--yellow p,
    .result-header--green p {
        font-size: 14px;
        line-height: 1.4;
        margin: 0;
    }

    /* 2) SIDRUBRIKER INNE I KORTEN (page-wrapper) */
    .page-wrapper h1 {
        font-size: 24px;
        line-height: 1.3;
        margin-top: 0;
        margin-bottom: 12px;
    }

    .page-wrapper h2 {
        font-size: 22px;
        line-height: 1.3;
        margin-top: 0;
        margin-bottom: 12px;
    }

    .page-wrapper h3 {
        font-size: 20px;
        line-height: 1.3;
        margin-top: 0;
        margin-bottom: 12px;
    }

    /* 3) BRÖDTEXT INNE I PAGE-WRAPPER */
    .page-wrapper p {
        font-size: 14px;
        line-height: 1.5;
        margin: 0 0 10px 0;
    }

    /* 4) HJÄLP- / FÖRKLARINGSTEXTER */
    .page-wrapper .help-text {
        font-size: 13px;
        line-height: 1.4;
    }

    /* 5) LABELS (t.ex. "Paste one or more reference codes...") */
    .page-wrapper label {
        font-size: 14px;
        font-weight: 600;
    }
}

/* Shared textarea style for all write-in questions (Core AI, microtests, Premium AI etc.) */


