/* ============================================================
   TOOL.CSS — HEALTHY KNOTS ASSESSMENT TOOL UI
   ============================================================ */

/* Tool wrapper */
.hk-assessment-tool {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: clamp(20px, 5vw, 40px);
    box-sizing: border-box;
}

/* Screens / cards */
.hk-welcome,
.hk-app,
.hk-result-card {
    width: 100%;
box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: clamp(24px, 5vw, 48px);
    box-shadow: var(--card-shadow);
    
}

.hk-status-pill,
.hk-result-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 8px 14px;
    border-radius: 999px;
    margin: 0 auto 18px;
}

/* Welcome screen polish */
#hk-welcome {
    text-align: center;
    background: linear-gradient(
        to bottom,
        rgba(46, 125, 50, 0.04),
        rgba(46, 125, 50, 0.01)
    );
    border-radius: 28px;
}

#hk-welcome .hk-main-title {
    max-width: 720px;
    margin: 0 auto 16px;
    font-size: clamp(2rem, 6vw, 3.3rem);
    line-height: 1.08;
    color: var(--dark);
}

#hk-welcome .hk-sub-intro {
    max-width: 620px;
    margin: 0 auto;
    color: var(--muted);
}

/* Name box */
.hk-name-box {
    max-width: 560px;
    width: 100%;
    margin: 30px auto;
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    text-align: left;
    box-sizing: border-box;
}


.hk-name-box label {
    display: block;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 8px;
}

.hk-name-box label span {
    color: var(--muted);
    font-weight: 700;
}

.hk-name-box input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: 16px;
    background: #ffffff;
}

.hk-name-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.10);
}

.hk-name-box small {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    line-height: 1.5;
}

/* Info list */
.hk-info-list {
    max-width: 620px;
    margin: 30px auto;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 22px;
    text-align: left;
}

.hk-info-item {
    padding: 16px 18px;
    border-bottom: 1px solid #edf2f7;
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
}

.hk-info-item:last-child {
    border-bottom: none;
}

.hk-info-item strong {
    color: var(--dark);
    font-weight: 900;
}

.hk-info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hk-info-item .hk-icon {
    font-size: 18px;
    line-height: 1.2;
    margin-top: 2px;
}

.hk-info-item div {
    flex: 1;
}

/* Notice / support */
.hk-notice-box,
.hk-support-note {
    max-width: 620px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 20px;
    padding: 18px 20px;
    margin: 28px auto;
    color: #78350f;
    line-height: 1.6;
}

#hk-welcome .hk-notice-box {
    text-align: center;
}

.hk-tool-footer,
.hk-result-disclaimer,
.hk-participant-count {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

#hk-welcome .hk-tool-footer {
    margin-top: 22px;
    text-align: center;
}

/* Buttons */
.hk-start-btn,
.hk-btn,
.hk-btn-outline,
.hk-btn-primary,
.hk-next-btn,
.hk-opt-card {
    cursor: pointer;
    border-radius: 14px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.hk-start-btn,
.hk-btn-primary {
    background: var(--primary);
    color: #ffffff !important;
    padding: 14px 22px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.hk-btn,
.hk-btn-outline {
    background: #ffffff;
    color: var(--primary) !important;
    padding: 14px 18px;
    border: 1px solid #dbe4ef;
    text-decoration: none;
}

.hk-start-btn:hover,
.hk-btn:hover,
.hk-btn-outline:hover,
.hk-btn-primary:hover,
.hk-next-btn.active:hover,
.hk-opt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}


/* Welcome screen button polish */
#hk-welcome .hk-start-btn {
    display: inline-flex;
    width: auto;
    min-width: 220px;
    margin: 24px auto 10px;
    padding: 16px 28px;
    font-size: 16px;
    justify-content: center;
}

/* Mobile: full width feels better */
@media (max-width: 700px) {
    #hk-welcome .hk-start-btn {
        width: 100%;
    }
}
#hk-welcome .hk-info-list {
    margin-bottom: 34px;
}

#hk-welcome .hk-notice-box {
    margin-bottom: 30px;
}
/* Question flow */
.hk-progress-rail {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

#hk-step-fill {
    height: 100%;
    width: 0%;
    background: var(--hk-green-grad);
    border-radius: 999px;
    transition: width 0.25s ease;
}

#hk-step-text {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
    margin-bottom: 20px;
}

.hk-q-display {
    font-size: clamp(1.35rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 24px;
}

.hk-options-stack {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}
.hk-options-stack {
    width: 100%;
}

.hk-opt-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #dbe4ef;
    padding: 16px 18px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--dark);
}

.hk-radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
}

.hk-selected {
    border-color: var(--primary);
    background: #f0fdf4;
}

.hk-selected .hk-radio-circle {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: inset 0 0 0 4px #f0fdf4;
}

.hk-next-btn {
    width: 100%;
    margin-top: 22px;
    padding: 16px 20px;
    border: none;
    background: #d8e0d7;
    color: #ffffff;
    cursor: not-allowed;
}

.hk-next-btn.active {
    background: var(--primary);
    cursor: pointer;
}

/* Report / result screen */
.hk-report {
    max-width: 900px;
    margin: 40px auto;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.hk-report-header {
    display: none;
}

.hk-report-logo {
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
}

.hk-report-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hk-report-brand strong {
    color: var(--dark);
    font-weight: 900;
}

.hk-report-meta {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    text-align: right;
}

.hk-result-card {
    border-top: 6px solid var(--primary);
}

.hk-result-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 22px;
}

.hk-score-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid var(--primary);
    background: #f4f9f3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hk-score-ring span {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.hk-score-ring small {
    font-size: 12px;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hk-result-card h2 {
    font-size: clamp(1.7rem, 5vw, 2.7rem);
    line-height: 1.1;
    margin: 8px 0 12px;
    color: var(--dark);
    letter-spacing: -0.3px;
}

.hk-result-message {
    font-size: 15px;
    line-height: 1.6;
    margin: 20px 0;
}

.hk-dual-support-box {
    background: #f4f9f3;
    border: 1px solid #dcebd9;
    border-radius: 22px;
    padding: 24px;
    margin-top: 24px;
}

.hk-dual-support-box h3 {
    margin-top: 0;
    color: var(--dark);
}

.hk-dual-support-box p {
    font-size: 14px;
    color: var(--muted);
}

.hk-dual-support-box a {
    margin-right: 10px;
    margin-bottom: 10px;
}

.hk-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.hk-result-disclaimer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--muted);
}

/* Severity accents */
.hk-result-low {
    border-top-color: #2e7d32;
}

.hk-result-mild {
    border-top-color: #b8860b;
}

.hk-result-moderate {
    border-top-color: #ef6c00;
}

.hk-result-severe {
    border-top-color: #c62828;
}

/* Mobile */
@media (max-width: 700px) {
    .hk-assessment-tool {
        padding: 16px;
    }

    .hk-result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hk-result-actions,
    .hk-dual-support-box a {
        width: 100%;
    }

    .hk-start-btn,
    .hk-btn,
    .hk-btn-outline,
    .hk-btn-primary {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   PRINT MODE — REAL REPORT
   ============================================================ */

@media print {

    body * {
        visibility: hidden !important;
    }

    .hk-report,
    .hk-report * {
        visibility: visible !important;
    }

    .hk-dual-support-box {
    display: none !important;
}

    .hk-report {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 10mm;
        background: #ffffff;
    }

    .hk-report-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 24px;
        margin-bottom: 10mm !important;
        padding-bottom: 5mm;
        border-bottom: 1px solid #e2e8f0;
    }

    .hk-report-logo {
        max-width: 42px !important;
        max-height: 42px !important;
    }

    .hk-result-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .hk-result-header {
        margin-bottom: 8mm;
    }

    .hk-score-ring {
        width: 90px !important;
        height: 90px !important;
        border-width: 5px !important;
    }

    .hk-score-ring span {
        font-size: 32px !important;
    }

    .hk-support-note {
        margin: 8mm 0 !important;
    }

    

    .hk-result-actions,
    .hk-status-pill,
    .hk-tool-footer {
        display: none !important;
    }

    .hk-result-disclaimer {
        margin-top: 8mm !important;
        font-size: 11px !important;
    }

    @page {
        size: A4 portrait;
        margin: 10mm;
    }
}

/* ============================================================
   FINAL ALIGNMENT POLISH
   ============================================================ */

/* Center the top badge */
.hk-result-kicker {
    display: flex;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

/* Center score + heading block */
.hk-result-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Center score ring */
.hk-score-ring {
    margin-bottom: 8px;
}

/* Center action buttons */
.hk-result-actions {
    justify-content: center;
}

/* Participant name styling */
.hk-result-header p strong {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hk-report-guidance {
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.hk-report-meta-block {
    margin-top: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text);
}

.hk-report-meta-block p {
    margin: 4px 0;
}

.hk-report-meta-block strong {
    color: var(--dark);
}

/* ===== MICRO ANIMATIONS ===== */

/* Fade-in for welcome content */
#hk-welcome {
    animation: hkFadeIn 0.6s ease;
}

@keyframes hkFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info item hover (very subtle) */
.hk-info-item {
    transition: transform 0.2s ease, background 0.2s ease;
    border-radius: 12px;
}

.hk-info-item:hover {
    background: rgba(46, 125, 50, 0.04);
    transform: translateY(-2px);
}

/* Button interaction */
.hk-start-btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hk-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.15);
}

.hk-start-btn:active {
    transform: scale(0.98);
    box-shadow: none;
}

/* Constrain question screen content */
#hk-app {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    box-sizing: border-box;
}
#hk-question {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 20px;
    text-align: center;
    box-sizing: border-box;
}
.hk-options {
    max-width: 640px;
    margin: 0 auto;
}
.hk-progress-rail {
    max-width: 640px;
    margin: 0 auto 16px;
}

/* ===== QUESTION FLOW POLISH ===== */

#hk-app {
    text-align: center;
    background: linear-gradient(
        to bottom,
        rgba(46, 125, 50, 0.035),
        rgba(46, 125, 50, 0.01)
    );
    border-radius: 28px;
}

#hk-step-text {
    text-align: center;
    letter-spacing: 0.05em;
}

.hk-options-stack {
    max-width: 640px;
    margin: 26px auto 0;
}

.hk-opt-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #dbe4ef;
    padding: 17px 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}

.hk-opt-card:hover {
    border-color: rgba(46, 125, 50, 0.35);
    background: #fbfefc;
}

.hk-selected {
    border-color: var(--primary);
    background: #f0fdf4;
    box-shadow: 0 12px 28px rgba(46, 125, 50, 0.10);
}

.hk-next-btn {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
}

.hk-next-btn.active {
    box-shadow: 0 12px 24px rgba(46, 125, 50, 0.16);
}

.hk-next-btn:active {
    transform: scale(0.99);
}

/* Align result screen like welcome + question */
#hk-result {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(
        to bottom,
        rgba(46, 125, 50, 0.035),
        rgba(46, 125, 50, 0.01)
    );
    border-radius: 28px;
}
.hk-report {
    text-align: center;
}

.hk-result-card {
    text-align: center;
}

.hk-report-meta-block {
    max-width: 420px;
    margin: 16px auto 0;
    text-align: left;
}

.hk-result-message {
    max-width: 620px;
    margin: 22px auto;
    text-align: center;
}

.hk-support-note {
    max-width: 620px;
    margin: 24px auto;
    text-align: left;
}

.hk-dual-support-box {
    max-width: 620px;
    margin: 26px auto;
    text-align: center;
}


.hk-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.hk-result-actions button {
    min-width: 160px;
}

/* ============================================================
   RESULT PAGE POLISH — FINAL UI LAYER
   ============================================================ */

#hk-result {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(
        to bottom,
        rgba(46, 125, 50, 0.035),
        rgba(46, 125, 50, 0.01)
    );
    border-radius: 28px;
}

#hk-result .hk-report {
    max-width: 680px;
    margin: 0 auto;
}

#hk-result .hk-result-card {
    padding: clamp(26px, 5vw, 44px);
    border-radius: 26px;
    text-align: center;
}

.hk-report-meta-block {
    max-width: 430px;
    margin: 16px auto 0;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    text-align: left;
}

.hk-report-meta-block p {
    margin: 6px 0;
    font-size: 14px;
}

.hk-result-message {
    max-width: 620px;
    margin: 24px auto 12px;
    text-align: left;              /* FIX */
    line-height: 1.75;             /* better Hindi readability */
    word-break: normal;
    overflow-wrap: break-word;
}

.hk-result-actions-list {
    max-width: 620px;
    margin: 18px auto;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 20px;
    text-align: left;
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
}

.hk-result-actions-list div {
    margin-bottom: 8px;
}

.hk-result-actions-list div:last-child {
    margin-bottom: 0;
}

#hk-result .hk-support-note {
    max-width: 620px;
    margin: 24px auto;
    text-align: left;
}

#hk-result .hk-dual-support-box {
    max-width: 620px;
    margin: 26px auto;
    text-align: center;
}

#hk-result .hk-dual-support-box a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.hk-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 26px auto 18px;
}

.hk-result-actions button {
    min-width: 160px;
}

.hk-result-disclaimer,
.hk-report-guidance {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

@media (max-width: 700px) {
    #hk-result {
        max-width: 100%;
    }

    .hk-result-actions {
        flex-direction: column;
    }

    .hk-result-actions button,
    #hk-result .hk-dual-support-box a {
        width: 100%;
    }

    .hk-report-meta-block,
    .hk-result-actions-list,
    #hk-result .hk-support-note,
    #hk-result .hk-dual-support-box {
        max-width: 100%;
    }
}

/* ============================================================
   Tool Nav Button
   ============================================================ */
   .hk-nav-buttons {
    display: flex;
    gap: 14px;
    margin-top: 18px;
    width: 100%;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hk-nav-buttons button {
    flex: 1;
    margin: 0 !important;
}

.hk-prev-btn {
    background: #fff;
    border: 1px solid #dbe3ea;
    color: #2e7d32;
    box-shadow: none;
}

.hk-prev-btn:hover {
    background: #f8fafc;
}

@media (max-width: 640px) {
    .hk-nav-buttons {
        flex-direction: row;
    }
}
