﻿/* =========================================================
   AITM Personality System
   Calm • Energy • Editorial • Responsive • Accessible
   ========================================================= */

/* -------------------------
   DESIGN TOKENS
-------------------------- */
:root {
    --bg-main: #F6F9FF;
    --bg-card: #FFFFFF;
    --bg-soft: rgba(255,255,255,.72);
    --text-main: #0B1220;
    --text-muted: rgba(11,18,32,.68);
    --accent: #2B6BFF;
    --accent-soft: rgba(43,107,255,.12);
    --accent-green: #22C55E;
    --border: rgba(11,18,32,.12);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 8px 24px rgba(2,6,23,.06);
    --shadow-md: 0 18px 48px rgba(2,6,23,.10);
    --font-sans: system-ui,-apple-system,"Segoe UI",Roboto,Arial;
    --font-serif: ui-serif,Georgia,serif;
}

/* -------------------------
   BASE RESET
-------------------------- */
body {
    background: var(--bg-main);
}

.pti,
.test-wrapper,
.ptype,
.ptypes {
    font-family: var(--font-sans);
    color: var(--text-main);
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   INDEX (INTRO)
========================================================= */
.pti {
    padding: 90px 20px;
}

.pti-container {
    max-width: 960px;
    margin: auto;
}

.pti-head {
    margin-bottom: 48px;
}

    .pti-head h1 {
        font-size: clamp(36px,4vw,52px);
        margin-bottom: 14px;
    }

.pti-sub {
    max-width: 640px;
    font-size: 18px;
}

.pti-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
    margin-bottom: 48px;
}

.pti-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.pti-k {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.pti-v {
    font-size: 15px;
}

.pti-actions {
    margin-bottom: 28px;
}

.pti-btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 18px 26px;
    border-radius: 999px;
    background: linear-gradient(135deg,var(--accent-soft),rgba(34,197,94,.12));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

    .pti-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 22px 52px rgba(2,6,23,.14);
        background: linear-gradient( 135deg, rgba(43,107,255,.18), rgba(34,197,94,.18) );
    }

    .pti-btn:active {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(2,6,23,.10);
    }


.pti-btn-text {
    font-size: 16px;
}

.pti-btn-mark {
    font-size: 20px;
}

.pti-note {
    font-size: 13px;
    color: var(--text-muted);
}

/* =========================================================
   TEST PAGE
========================================================= */
.test-wrapper {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 20px;
}

.test-progress {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.question-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
}

.question-text {
    font-size: 18px;
    margin-bottom: 20px;
}

.scale {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.scale-label {
    font-size: 13px;
    color: var(--text-muted);
}

.scale-options {
    display: flex;
    gap: 14px;
    justify-content: center;
}

    .scale-options label {
        position: relative;
    }

    .scale-options input {
        appearance: none;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 2px solid var(--border);
        cursor: pointer;
        transition: .2s;
    }

        .scale-options input:checked {
            border-color: var(--accent);
            background: var(--accent);
        }

.test-action {
    margin-top: 40px;
}

#nextBtn {
    padding: 14px 26px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
    #nextBtn:not(:disabled):hover {
        transform: translateY(-2px);
        background: linear-gradient( 135deg, rgba(43,107,255,.12), rgba(34,197,94,.10) );
        box-shadow: 0 14px 34px rgba(2,6,23,.12);
    }

    #nextBtn:not(:disabled):active {
        transform: translateY(0);
        box-shadow: 0 8px 18px rgba(2,6,23,.10);
    }

    #nextBtn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

/* =========================================================
   TYPE DETAIL
========================================================= */
.ptype {
    max-width: 900px;
    margin: 90px auto;
    padding: 0 20px;
}

.ptype-head {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 36px;
}

.ptype-code {
    font-size: 13px;
    letter-spacing: .2em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.ptype-group {
    font-size: 14px;
    color: var(--text-muted);
}

.ptype-summary {
    font-size: 18px;
    margin-top: 14px;
}

.ptype-sec {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

    .ptype-sec h2 {
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: .12em;
        margin-bottom: 14px;
    }

    .ptype-sec ul {
        padding-left: 18px;
    }

    .ptype-sec li {
        margin: 8px 0;
    }

/* =========================================================
   TYPES GRID
========================================================= */
.ptypes {
    max-width: 1100px;
    margin: 90px auto;
    padding: 0 20px;
}

.ptypes-head {
    max-width: 640px;
    margin-bottom: 40px;
}

    .ptypes-head h1 {
        font-size: clamp(36px,4vw,52px);
        margin-bottom: 12px;
    }

.ptypes-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 22px;
}

.ptype-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

    .ptype-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 26px 60px rgba(2,6,23,.14);
        border-color: rgba(43,107,255,.25);
    }

.ptype-title {
    font-size: 20px;
    margin-bottom: 6px;
}

.ptype-desc {
    font-size: 14px;
    margin-bottom: 14px;
}

.ptype-link {
    font-size: 14px;
    color: var(--accent);
    transition: color .2s ease, transform .2s ease;
}

    .ptype-link:hover {
        color: var(--accent);
        transform: translateX(4px);
    }

/* =========================================================
   RESPONSIVE
========================================================= */
@media(max-width:900px) {
    .pti-grid,
    .ptypes-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media(max-width:520px) {
    .pti-grid,
    .ptypes-grid {
        grid-template-columns: 1fr;
    }

    .scale {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}




/* ===============================
   7-POINT SCALE (PREMIUM)
   =============================== */

/* =========================================================
   7-POINT SCALE (PREMIUM · CALM · MICRO-ANIMATION)
   ========================================================= */

/* Layout */
.scale-7 {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 26px;
}

/* Side labels */
.scale-label {
    font-size: 14px;
    color: #64748b;
    white-space: nowrap;
}

/* Options container */
.scale-options {
    display: flex;
    justify-content: center;
    gap: 18px;
}

/* -------------------------
   Base item
-------------------------- */
.scale-item {
    position: relative;
}

    .scale-item input {
        display: none;
    }

    .scale-item span {
        display: block;
        border-radius: 50%;
        cursor: pointer;
        background: #e5e7eb;
        /* micro-animation base */
        transition: transform 0.18s ease, box-shadow 0.18s ease, outline 0.18s ease, filter 0.18s ease;
    }

/* -------------------------
   Sizes + colors
   (center → edges grow)
-------------------------- */

/* Strong agree (left) */
.s-3 span {
    width: 52px;
    height: 52px;
    background: #a855f7;
}

.s-2 span {
    width: 44px;
    height: 44px;
    background: #a855f7;
}

.s-1 span {
    width: 36px;
    height: 36px;
    background: #a855f7;
}

/* Neutral */
.s0 span {
    width: 28px;
    height: 28px;
    background: #cbd5e1;
}

/* Disagree (right) */
.s1 span {
    width: 36px;
    height: 36px;
    background: #22c55e;
}

.s2 span {
    width: 44px;
    height: 44px;
    background: #22c55e;
}

.s3 span {
    width: 52px;
    height: 52px;
    background: #22c55e;
}

/* -------------------------
   Hover (unselected)
-------------------------- */
.scale-item:hover span {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    filter: brightness(1.05);
}

/* Neutral is calmer */
.scale-item.s0:hover span {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

/* -------------------------
   Checked state (focus + pulse)
-------------------------- */
.scale-item input:checked + span {
    outline: 7px solid #0f172a;
    outline-offset: 3px;
    transform: scale(1.12);
    box-shadow: 0 0 0 10px rgba(15, 23, 42, 0.08), 0 12px 32px rgba(15, 23, 42, 0.22);
    animation: scaleSettle 0.22s ease-out;
}

/* settle-down animation */
@keyframes scaleSettle {
    0% {
        transform: scale(1.18);
    }

    100% {
        transform: scale(1.12);
    }
}

/* -------------------------
   Keyboard accessibility
-------------------------- */
.scale-item input:focus-visible + span {
    outline: 7px solid #2563eb;
    outline-offset: 4px;
}

/* -------------------------
   Reduced motion support
-------------------------- */
@media (prefers-reduced-motion: reduce) {
    .scale-item span,
    .scale-item input:checked + span {
        transition: none !important;
        animation: none !important;
    }
}



/* =========================================================
   Personality Test — MOBILE + TABLET (PREMIUM)
   Only min-width breakpoints
   Range: 320px → 1024px
   Single source of truth (no conflicts)
   ========================================================= */

/* ===============================
   >=320px — Phones (base)
=============================== */
@media (min-width: 320px) {

    /* Layout */
    .test-wrapper {
        max-width: 100%;
        margin: 28px auto;
        padding: 0 14px;
    }

    .test-progress {
        font-size: 12.5px;
        color: rgba(11,18,32,.62);
        margin: 0 0 14px;
        padding: 10px 12px;
        border-radius: 14px;
        border: 1px solid rgba(11,18,32,.10);
        background: rgba(255,255,255,.78);
        backdrop-filter: blur(10px);
    }

    .questions-container {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    /* Question card */
    .question-item {
        padding: 16px;
        border-radius: 18px;
        background: #fff;
        border: 1px solid rgba(11,18,32,.12);
        box-shadow: 0 10px 24px rgba(2,6,23,.06);
    }

        .question-item.answered {
            border-color: rgba(43,107,255,.28);
            box-shadow: 0 10px 24px rgba(2,6,23,.06), 0 0 0 3px rgba(43,107,255,.06);
        }

    .question-text {
        font-size: 15.5px;
        line-height: 1.55;
        margin: 0 0 12px;
        color: rgba(11,18,32,.92);
    }

    /* =========================
     Scale layout (mobile)
     Labels stack to avoid overflow
     ========================= */
    .scale-7 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: center;
        justify-items: center;
        margin-top: 6px;
    }

    .scale-label {
        font-size: 12.5px;
        line-height: 1.2;
        color: rgba(11,18,32,.62);
        white-space: normal;
        margin: 0; /* kill old margins */
        text-align: center;
    }

        .scale-label.left {
            color: #a855f7;
        }

        .scale-label.right {
            color: #22c55e;
        }

    /* Options row: tight + premium */
    .scale-options {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between; /* premium fit */
        gap: 10px;
    }

    /* Dots: compact but readable */
    .s-3 span {
        width: 42px;
        height: 42px;
    }

    .s-2 span {
        width: 36px;
        height: 36px;
    }

    .s-1 span {
        width: 30px;
        height: 30px;
    }

    .s0 span {
        width: 26px;
        height: 26px;
    }

    .s1 span {
        width: 30px;
        height: 30px;
    }

    .s2 span {
        width: 36px;
        height: 36px;
    }

    .s3 span {
        width: 42px;
        height: 42px;
    }

    /* Checked (calm, not cartoonish) */
    .scale-item input:checked + span {
        outline: 5px solid rgba(15,23,42,.92);
        outline-offset: 3px;
        transform: scale(1.07);
        box-shadow: 0 0 0 8px rgba(15,23,42,.06), 0 10px 24px rgba(15,23,42,.16);
    }

    /* Next button */
    #nextBtn {
        width: 100%;
        min-height: 52px;
        font-size: 15px;
        font-weight: 600;
        border-radius: 999px;
        transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
    }

        #nextBtn.enabled {
            opacity: 1;
            transform: translateY(0);
            background: linear-gradient(135deg, rgba(43,107,255,.12), rgba(34,197,94,.10));
            border-color: rgba(43,107,255,.20);
            box-shadow: 0 14px 34px rgba(2,6,23,.10);
        }

        #nextBtn:disabled {
            opacity: .45;
            box-shadow: none;
        }

    /* tiny phones (≤360) safety */
    @media (max-width: 360px) {
        .scale-options {
            gap: 8px;
        }

        .s-3 span, .s3 span {
            width: 40px;
            height: 40px;
        }

        .s-2 span, .s2 span {
            width: 34px;
            height: 34px;
        }

        .question-text {
            font-size: 15px;
        }
    }
}


/* ===============================
   >=375px — Medium phones
=============================== */
@media (min-width: 375px) {

    .test-wrapper {
        padding: 0 16px;
    }

    .question-text {
        font-size: 16px;
    }

    .scale-options {
        gap: 12px;
    }

    .s-3 span {
        width: 44px;
        height: 44px;
    }

    .s3 span {
        width: 44px;
        height: 44px;
    }
}


/* ===============================
   >=414px — Large phones
=============================== */
@media (min-width: 414px) {

    .test-wrapper {
        padding: 0 18px;
    }

    .question-item {
        padding: 18px;
    }

    .question-text {
        font-size: 16.5px;
    }

    .scale-options {
        gap: 14px;
    }

    .s-3 span {
        width: 46px;
        height: 46px;
    }

    .s3 span {
        width: 46px;
        height: 46px;
    }
}


/* ===============================
   >=480px — Small phablet
=============================== */
@media (min-width: 480px) {

    .test-wrapper {
        margin: 34px auto;
        padding: 0 20px;
    }

    .questions-container {
        gap: 16px;
    }

    .question-item {
        border-radius: 20px;
    }
}


/* ===============================
   >=600px — Phablet
=============================== */
@media (min-width: 600px) {

    .test-wrapper {
        margin: 44px auto;
        padding: 0 24px;
    }

    .question-text {
        font-size: 17px;
    }

    /* a bit more breathing room */
    .scale-options {
        gap: 16px;
        justify-content: center;
    }
}


/* ===============================
   >=768px — Tablet portrait
   Bring labels back to left/right
=============================== */
@media (min-width: 768px) {

    .test-wrapper {
        max-width: 720px;
        margin: 72px auto;
        padding: 0 28px;
    }

    .test-progress {
        font-size: 13.5px;
        padding: 10px 14px;
    }

    .question-item {
        padding: 22px;
    }

    .question-text {
        font-size: 18px;
    }

    /* Tablet scale: classic row layout */
    .scale-7 {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 22px;
        align-items: center;
        justify-items: stretch;
    }

    .scale-label {
        white-space: nowrap;
        text-align: left;
        font-size: 13px;
    }

        .scale-label.right {
            text-align: right;
        }

    .scale-options {
        width: auto;
        justify-content: center;
        gap: 18px;
    }
}


/* ===============================
   >=900px — Tablet large
=============================== */
@media (min-width: 900px) {

    .test-wrapper {
        max-width: 820px;
    }

    .question-item {
        padding: 24px;
    }

    .scale-options {
        gap: 20px;
    }
}


/* ===============================
   >=1024px — Tablet landscape
=============================== */
@media (min-width: 1024px) {

    .test-wrapper {
        max-width: 860px;
    }

    #nextBtn {
        max-width: 420px;
        margin: 0 auto;
        display: block;
    }
}


/* ===============================
   SCALE LAYOUT — LEFT / CENTER / RIGHT
   Works on mobile + desktop
=============================== */

.scale-7 {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
}

/* Sol label */
.scale-label.left {
    justify-self: start;
    text-align: left;
    white-space: nowrap;
}

/* Sağ label */
.scale-label.right {
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}

/* Orta hissə (dairələr) */
.scale-options {
    display: flex;
    justify-content: center;
    gap: 14px;
}


@media (max-width: 360px) {
    .scale-label {
        font-size: 12px;
    }

    .scale-7 {
        gap: 10px;
    }
}
/* =========================================================
   SCALE-7 — Mobile fix: labels on top row, dots on 2nd row
   Keeps "Razıyam" left, "Razı deyiləm" right, and fits screen
   ========================================================= */

/* Default (desktop/tablet) — 1 row */
.scale-7 {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
}

.scale-label.left {
    justify-self: start;
    text-align: left;
    white-space: nowrap;
}

.scale-label.right {
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}

.scale-options {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: nowrap;
}

/* Mobile — 2 rows to fit */
@media (max-width: 520px) {
    .scale-7 {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "left right"
            "dots dots";
        row-gap: 10px;
        column-gap: 12px;
    }

    .scale-label.left {
        grid-area: left;
    }

    .scale-label.right {
        grid-area: right;
    }

    .scale-options {
        grid-area: dots;
        justify-content: center;
        gap: 10px; /* daha yığcam */
        flex-wrap: nowrap;
        overflow: hidden; /* taşma olmasın */
    }

    .scale-label {
        font-size: 12.5px;
        line-height: 1.2;
    }
}

/* Extra small phones — even tighter */
@media (max-width: 360px) {
    .scale-options {
        gap: 8px;
    }

    .scale-label {
        font-size: 12px;
    }
}

.pr-link-primary.pr-pdf {
    background: linear-gradient(135deg, rgba(34,197,94,.14), rgba(43,107,255,.10));
    border-color: rgba(34,197,94,.28);
}

.pr-link-primary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    text-decoration: none;
    color: #4f46e5;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease, transform .15s ease;
}

    /* Mouse hover */
    .pr-link-primary:hover {
        color: #4338ca;
        border-bottom-color: currentColor;
        transform: translateY(-1px);
    }

    /* Keyboard focus (accessibility) */
    .pr-link-primary:focus-visible {
        outline: 3px solid rgba(79,70,229,.35);
        outline-offset: 4px;
        border-bottom-color: currentColor;
    }












/* ===============================
   Personality Type – Back Link
   =============================== */

.pti-head-link {
    margin-bottom: 24px;
}

/* Link özü */
.tb-types {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .7px;
    color: rgba(15, 23, 42, 0.72);
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-soft), rgba(34, 197, 94, .12));
    transition: color .2s ease, background .2s ease, transform .15s ease;
}

    /* Ox işarəsi – pseudo element */
    .tb-types::before {
        content: "←";
        font-size: 14px;
        opacity: .6;
        transition: transform .2s ease, opacity .2s ease;
    }

    /* Hover effekti */
    .tb-types:hover {
        color: rgba(15, 23, 42, 0.95);
        background: rgba(15, 23, 42, 0.08);
        transform: translateX(-2px);
    }

        /* Ox da reaksiya versin */
        .tb-types:hover::before {
            transform: translateX(-3px);
            opacity: .9;
        }

    /* Aktiv / fokus vəziyyəti */
    .tb-types:focus-visible {
        outline: 2px solid rgba(59, 130, 246, 0.45);
        outline-offset: 2px;
    }

/* Mobil optimizasiya */
@media (max-width: 768px) {
    .tb-types {
        font-size: 13px;
        padding: 6px 8px;
    }
}













/* =========================================================
   LARGE PHONES (481–600px)
========================================================= */
@media (min-width:481px) {
    .pti {
        padding: 52px 20px 40px
    }

    .pti-head h1 {
        font-size: 32px
    }

    .pti-sub {
        font-size: 15.5px
    }

    .pti-grid {
        gap: 16px
    }

    .pti-item {
        padding: 18px
    }
}

/* =========================================================
   PHABLET (601–767px)
========================================================= */
@media (min-width:601px) {
    .pti {
        padding: 60px 24px 44px
    }

    .pti-head h1 {
        font-size: 34px
    }

    .pti-sub {
        font-size: 16px
    }

    .pti-grid {
        grid-template-columns: repeat(2,1fr); /* 2 columns */
        gap: 18px;
    }

    .pti-btn {
        max-width: 420px;
        margin: 0 auto
    }
}

/* =========================================================
   TABLET PORTRAIT (768–900px)
========================================================= */
@media (min-width:768px) {
    .pti {
        padding: 72px 32px 56px
    }

    .pti-container {
        max-width: 720px;
        margin: auto
    }

    .pti-head h1 {
        font-size: 38px
    }

    .pti-sub {
        font-size: 17px
    }

    .pti-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 20px;
    }

    .pti-item {
        padding: 20px
    }
}

/* =========================================================
   TABLET LANDSCAPE (901–1024px)
========================================================= */
@media (min-width:901px) {
    .pti-container {
        max-width: 960px
    }

    .pti-grid {
        grid-template-columns: repeat(4,1fr); /* desktop-like */
        gap: 22px;
    }

    .pti-btn {
        max-width: 480px
    }
}









/* =========================
   Test Index — How it works
========================= */
/* =========================================================
   Personality Test — "How it works" (White / Premium)
   Targets:
   .pti-how, .pti-how-head, .pti-how-lead
   .pti-spec, .pti-spec-item, .pti-spec-k, .pti-spec-v
   .pti-how-grid, .pti-how-card, .pti-how-title, .pti-how-note
   ========================================================= */

/* ---------- Tokens (local) ---------- */
:root {
    --pti-text: #0b1220;
    --pti-muted: rgba(11,18,32,.72);
    --pti-border: rgba(11,18,32,.12);
    --pti-soft: rgba(11,18,32,.06);
    --pti-surface: #ffffff;
    --pti-surface-2: rgba(255,255,255,.78);
    --pti-accent: #2b6bff;
    --pti-accent-2: #22c55e;
    --pti-accent-3: #a855f7;
    --pti-r-14: 14px;
    --pti-r-18: 18px;
    --pti-r-22: 22px;
    --pti-shadow-sm: 0 10px 24px rgba(2, 6, 23, .06);
    --pti-shadow-md: 0 20px 60px rgba(2, 6, 23, .10);
    --pti-focus: 0 0 0 4px rgba(43,107,255,.20);
    --pti-trans: 200ms ease;
}

/* ---------- Section shell ---------- */
.pti-how {
    margin-top: 24px;
    padding: 22px;
    border-radius: var(--pti-r-22);
    background: var(--pti-surface);
    border: 1px solid var(--pti-border);
    box-shadow: var(--pti-shadow-sm);
    position: relative;
    overflow: hidden;
}

    .pti-how::before {
        content: "";
        position: absolute;
        inset: -120px -120px auto auto;
        width: 420px;
        height: 420px;
        background: radial-gradient(circle at 30% 30%, rgba(43,107,255,.14), transparent 60%), radial-gradient(circle at 70% 70%, rgba(34,197,94,.10), transparent 58%);
        transform: rotate(10deg);
        pointer-events: none;
    }

.pti-how-head {
    position: relative;
    z-index: 1;
    max-width: 980px;
}

    .pti-how-head h2 {
        margin: 0 0 10px;
        font-size: clamp(18px, 2.0vw, 24px);
        letter-spacing: -0.02em;
        color: var(--pti-text);
    }

.pti-how-lead {
    margin: 0 0 14px;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--pti-muted);
}

/* ---------- Specs mini grid ---------- */
.pti-spec {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.pti-spec-item {
    grid-column: span 4;
    padding: 14px 14px;
    border-radius: var(--pti-r-18);
    background: linear-gradient(180deg, var(--pti-surface-2), #fff);
    border: 1px solid var(--pti-border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
    position: relative;
    overflow: hidden;
}

    .pti-spec-item::before {
        content: "";
        position: absolute;
        inset: -60% -40% auto auto;
        width: 220px;
        height: 220px;
        background: radial-gradient(circle at 30% 30%, rgba(168,85,247,.10), transparent 60%);
        pointer-events: none;
    }

.pti-spec-k {
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(11,18,32,.55);
    margin-bottom: 6px;
}

.pti-spec-v {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--pti-text);
}

/* ---------- Cards grid ---------- */
.pti-how-grid {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.pti-how-card {
    grid-column: span 6;
    padding: 16px;
    border-radius: var(--pti-r-22);
    background: var(--pti-surface);
    border: 1px solid var(--pti-border);
    box-shadow: var(--pti-shadow-sm);
    transition: transform var(--pti-trans), box-shadow var(--pti-trans), border-color var(--pti-trans);
    position: relative;
    overflow: hidden;
}

    .pti-how-card::after {
        content: "";
        position: absolute;
        inset: auto 0 0 0;
        height: 3px;
        background: linear-gradient(90deg, rgba(43,107,255,.55), rgba(34,197,94,.45), rgba(168,85,247,.45));
        opacity: .35;
    }

    .pti-how-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--pti-shadow-md);
        border-color: rgba(43,107,255,.22);
    }

.pti-how-title {
    margin: 0 0 10px;
    font-size: 14px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pti-text);
}

/* Paragraphs + list inside cards */
.pti-how-card p {
    margin: 0;
    color: var(--pti-muted);
    line-height: 1.75;
    font-size: 14.5px;
}

.pti-how-card ul {
    margin: 0;
    padding-left: 18px;
}

.pti-how-card li {
    margin: 8px 0;
    color: var(--pti-muted);
    line-height: 1.7;
    font-size: 14.5px;
}

/* Note card = full width + calmer highlight */
.pti-how-card.pti-how-note {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(43,107,255,.07), rgba(34,197,94,.06), rgba(168,85,247,.06));
    border-color: rgba(43,107,255,.18);
}

    .pti-how-card.pti-how-note .pti-how-title {
        color: rgba(11,18,32,.92);
    }

/* ---------- Focus / accessibility ---------- */
.pti-how-card:focus-within,
.pti-spec-item:focus-within {
    outline: none;
    box-shadow: var(--pti-focus), var(--pti-shadow-sm);
    border-color: rgba(43,107,255,.28);
    border-radius: var(--pti-r-22);
}

/* ---------- Tablet breakpoints ---------- */

/* 1024px (iPad landscape / iPad Pro smaller) */
@media (max-width: 1024px) {
    .pti-how {
        padding: 18px;
    }

    .pti-spec-item {
        grid-column: span 6; /* 2 per row */
    }

    .pti-how-card {
        grid-column: span 12; /* 1 per row for readability */
    }
}

/* iPad Pro 12.9 portrait ~ 1024x1366 (height bigger) */
@media (width: 1024px) and (height: 1366px) {
    .pti-how {
        padding: 20px;
    }

    .pti-spec-item {
        grid-column: span 6;
        padding: 16px;
    }

    .pti-how-card {
        grid-column: span 12;
        padding: 18px;
    }

    .pti-how-lead {
        font-size: 16px;
    }
}

/* 1366px wide (iPad Pro landscape, some laptops) */
@media (max-width: 1366px) {
    .pti-spec-item {
        grid-column: span 4;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .pti-how {
        padding: 16px;
        margin-top: 16px;
    }

        .pti-how::before {
            display: none; /* mobile-də aura söndür */
        }

    .pti-how-lead {
        font-size: 14.5px;
    }

    .pti-spec {
        grid-template-columns: 1fr;
    }

    .pti-spec-item {
        grid-column: auto;
    }

    .pti-how-grid {
        grid-template-columns: 1fr;
    }

    .pti-how-card {
        grid-column: auto;
        padding: 14px;
    }

    .pti-how-title {
        font-size: 13px;
    }

    .pti-how-card p,
    .pti-how-card li {
        font-size: 14px;
    }
}

/* Smaller phones */
@media (max-width: 420px) {
    .pti-how {
        padding: 14px;
    }

    .pti-spec-v {
        font-size: 14px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pti-how-card {
        transition: none !important;
    }
}
/* HERO alt spacing */
.pti-sub {
    margin: 14px 0 10px;
}

.pti-head-link {
    margin-top: 10px;
}

/* Cards inside how-grid align nicely even if one has a UL */
.pti-how-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .pti-how-card p, .pti-how-card ul {
        margin: 0;
    }



/* =========================
   Test Disclaimer (White Theme)
========================= */
.pti-note {
    margin-top: 26px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px dashed #E2E8F0;
    color: rgba(11, 18, 32, .68);
    font-size: 13.5px;
    line-height: 1.65;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 6px 16px rgba(2, 6, 23, .04);
}

    /* Icon-like visual (CSS only, no extra HTML needed) */
    .pti-note::before {
        content: "ℹ️";
        font-size: 15px;
        line-height: 1.4;
        margin-top: 1px;
    }

/* Responsive polish */
@media (max-width: 520px) {
    .pti-note {
        padding: 12px 14px;
        font-size: 12.5px;
        line-height: 1.6;
    }
}






/* Likebox container */
.pti-likebox {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.96));
    box-shadow: 0 10px 24px rgba(2, 6, 23, .06);
}

/* Title row */
.pti-likebox__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.25;
    color: #0f172a; /* slate-900 */
}

    /* Heart icon as a soft badge */
    .pti-likebox__title i {
        display: inline-grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        background: rgba(239, 68, 68, .10);
        color: #ef4444; /* red-500 */

        box-shadow: 0 6px 14px rgba(239, 68, 68, .14);
    }

    /* Total count emphasis */
    .pti-likebox__title strong {
        font-weight: 800;
        padding: 2px 8px;
        border-radius: 10px;
        background: rgba(15, 23, 42, .06);
        color: #0f172a;
    }

/* Sub text */
.pti-likebox__sub {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(15, 23, 42, .76);
    padding-left: 44px; /* icon width + gap alignment */
}

/* Make the "top types" chunk behave nicely */
.pti-likebox__sub {
    word-break: break-word;
}

/* Optional: subtle hover (if it's clickable area) */
.pti-likebox:hover {
    border-color: rgba(15, 23, 42, .14);
    box-shadow: 0 14px 30px rgba(2, 6, 23, .08);
}

/* Dark mode (if you ever add .dark on body/html) */
.dark .pti-likebox {
    background: linear-gradient(180deg, rgba(30,41,59,.92), rgba(15,23,42,.92));
    border-color: rgba(148,163,184,.18);
    box-shadow: 0 12px 26px rgba(0,0,0,.30);
}

.dark .pti-likebox__title {
    color: #e2e8f0;
}

    .dark .pti-likebox__title strong {
        background: rgba(226,232,240,.10);
        color: #e2e8f0;
    }

.dark .pti-likebox__sub {
    color: rgba(226,232,240,.78);
}










/* ============================
   Context Prime Modal (Responsive)
   ============================ */

.prime-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.68);
    z-index: 9999;
    -webkit-overflow-scrolling: touch;
}

@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
    .prime-modal {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

.prime-modal.is-open {
    display: flex;
}

.prime-card {
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    padding: 22px 18px;
    background: #0f1115;
    color: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    text-align: center;
}

.prime-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.prime-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    opacity: 0.92;
}

.prime-timer {
    margin-top: 14px;
    font-size: 13px;
    opacity: 0.72;
}

/* Countdown badge */
#primeCountdown {
    display: inline-block;
    min-width: 28px;
    padding: 2px 10px;
    margin: 0 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    font-weight: 700;
}

@media (max-width: 480px) {
    .prime-modal {
        padding: 14px;
        align-items: center; /* ✅ ortada */
        justify-content: center; /* ✅ ortada */
    }

    .prime-card {
        max-width: 100%;
        border-radius: 18px;
        padding: 18px 16px;
        text-align: center; /* ✅ ortada oxunsun */
        max-height: 85vh; /* ✅ kiçik ekranlarda daşmasın */
        overflow: auto; /* ✅ lazım olsa scroll */
    }

    .prime-title {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .prime-text {
        font-size: 15px;
    }

    .prime-timer {
        margin-top: 12px;
        font-size: 13px;
    }
}


@media (max-height: 420px) {
    .prime-modal {
        align-items: center;
    }

    .prime-card {
        padding: 16px 16px;
    }
}

/* ============================
   FORCE VISIBILITY OVERRIDE
   (fix: only countdown shows)
   ============================ */

#contextPrimeModal .prime-card,
#contextPrimeModal .prime-card * {
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-text-fill-color: #fff !important;
}

#contextPrimeModal .prime-title,
#contextPrimeModal .prime-text,
#contextPrimeModal .prime-timer {
    display: block !important;
}












/* ===============================
   TEST NOTICES (Retest / Extra)
   =============================== */

.test-notice {
    position: sticky;
    top: 64px; /* header height-ə görə dəyişə bilərsən */
    z-index: 30;
    max-width: 820px;
    margin: 16px auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    line-height: 1.45;
    border-radius: 14px;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: noticeFadeIn 0.35s ease-out;
}

/* Retest — soft blue */
#retestNotice {
    background: linear-gradient( 135deg, rgba(227, 240, 255, 0.95), rgba(245, 250, 255, 0.95) );
    border: 1px solid rgba(120, 170, 255, 0.35);
    color: #1e3a5f;
}

/* Extra / adaptive — soft purple */
#extraNotice {
    background: linear-gradient( 135deg, rgba(243, 234, 255, 0.95), rgba(250, 245, 255, 0.95) );
    border: 1px solid rgba(175, 120, 255, 0.35);
    color: #3a1e5f;
}

/* Reasons list */
.test-notice__reasons {
    margin-top: 6px;
    padding-left: 18px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.75);
}

    .test-notice__reasons div,
    .test-notice__reasons li {
        margin-bottom: 4px;
    }

/* Optional icon alignment tweak */
.test-notice::before {
    content: "ℹ️";
    font-size: 18px;
    margin-right: 6px;
}

/* Animation */
@keyframes noticeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================
   MOBILE TWEAKS
   =============================== */
@media (max-width: 640px) {
    .test-notice {
        margin: 12px 12px;
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 12px;
    }
}
