/* ZOEOne shared stylesheet — everything reusable lives here.
   No per-page CSS files, no inline styles in views. */

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
    /* Palette — ZOE1 brand navy indigo (matches /zoe1/web landing). */
    --z-primary:        #1E2A78;
    --z-primary-rgb:    30, 42, 120; /* R,G,B of --z-primary, used for rgba() tints */
    --z-primary-dark:   #0F1854;
    --z-primary-light:  #4C5CC6;
    --z-primary-soft:   #EEF0FA;
    --z-primary-softer: #F5F6FB;

    --z-bg:             #F5F6FB;
    --z-bg-panel:       #ffffff;
    --z-bg-blue:        #1E2A78;
    --z-bg-blue-deep:   #0F1854;

    --z-text:           #0f172a;
    --z-text-muted:     #5b6478;
    --z-text-dim:       #8892a6;

    --z-border:         #e5e9f2;
    --z-border-strong:  #cbd2e0;

    --z-danger:         #dc2626;
    --z-success:        #16a34a;

    /* Accent shape colors */
    --z-shape-cyan:     #91d8ec;
    --z-shape-orange:   #f6893c;
    --z-shape-yellow:   #ffd233;
    --z-shape-pink:     #ffbac4;
    --z-shape-green:    #40b558;
    --z-shape-red:      #e64a3f;

    /* Radii */
    --z-radius-sm: 10px;
    --z-radius-md: 16px;
    --z-radius-lg: 24px;
    --z-radius-xl: 32px;
    --z-radius-pill: 999px;

    /* Shadows */
    --z-shadow-sm:      0 1px 2px rgba(15, 23, 36, 0.06);
    --z-shadow-md:      0 12px 40px rgba(15, 23, 36, 0.08);
    --z-shadow-lg:      0 24px 60px rgba(15, 23, 36, 0.14);
    --z-shadow-primary: 0 12px 32px rgba(30, 42, 120, 0.32);

    /* Fonts */
    --z-font-serif: 'Fraunces', 'Instrument Serif', Georgia, serif;
    --z-font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Motion */
    --z-ease:      cubic-bezier(.4, 0, .2, 1);
    --z-ease-out:  cubic-bezier(.16, 1, .3, 1);
    --z-ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
    margin: 0; padding: 0;
    font-family: var(--z-font-sans);
    color: var(--z-text);
    background: var(--z-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100%;
}
body {
    display: flex; flex-direction: column; min-height: 100vh;
    position: relative;
    /* Layered mesh of radial glows — richer than the old 2-stop background */
    background-image:
        radial-gradient(900px 520px at 8%  -6%,  rgba(145, 216, 236, 0.48), transparent 60%),
        radial-gradient(820px 520px at 96%  2%,  rgba(246, 137, 60,  0.26), transparent 55%),
        radial-gradient(640px 440px at 82% 46%,  rgba(76, 92, 198, 0.22), transparent 60%),
        radial-gradient(900px 560px at 10% 70%,  rgba(255, 186, 196, 0.22), transparent 60%),
        radial-gradient(1100px 640px at 55% 108%, rgba(30, 42, 120,  0.14), transparent 60%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}
/* Slow-drifting aurora layer sitting behind everything (z-index: -1). */
body::before {
    content: "";
    position: fixed; inset: -18%;
    background:
        radial-gradient(420px 420px at 22% 32%, rgba(145, 216, 236, 0.30), transparent 62%),
        radial-gradient(520px 520px at 78% 68%, rgba(255, 186, 196, 0.26), transparent 62%),
        radial-gradient(360px 360px at 50% 20%, rgba(255, 210, 51,  0.18), transparent 62%);
    filter: blur(28px);
    animation: z-aurora-drift 22s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}
@keyframes z-aurora-drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(2%, -1.5%, 0) scale(1.04); }
    100% { transform: translate3d(-1.5%, 2%, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
}
a { color: var(--z-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--z-primary); color: #fff; }

/* ============================================================
   2. Topbar
   ============================================================ */
.z-topbar {
    padding: 18px 20px 0;
    animation: z-fade-down .5s var(--z-ease-out) both;
}
.z-topbar-inner {
    max-width: 1180px; margin: 0 auto;
    padding: 8px 10px 8px 22px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--z-radius-pill);
    box-shadow: var(--z-shadow-md);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}
.z-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 18px; color: var(--z-text);
    letter-spacing: -0.01em;
}
.z-brand:hover { text-decoration: none; }
.z-brand-mark {
    width: 26px; height: 26px;
    border-radius: 8px;
    background: linear-gradient(140deg, var(--z-primary) 0%, var(--z-primary-light) 100%);
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(30, 42, 120, 0.35), inset 0 -1px 0 rgba(0,0,0,.15);
}
.z-brand-mark::after {
    content: "";
    width: 10px; height: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg) translate(-1px, 1px);
}
.z-brand-mark--img {
    width: 48px; height: 48px;
    background: transparent;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    box-shadow: none;
    padding: 0;
}
.z-brand-mark--img::after { content: none; }

.z-topbar-nav {
    display: flex; align-items: center; gap: 4px;
    justify-content: flex-end;
    justify-self: end;
}
.z-topbar-actions {
    display: flex; align-items: center; gap: 8px;
    justify-self: end;
}
.z-topbar-link {
    padding: 8px 14px;
    color: var(--z-text);
    font-size: 14px; font-weight: 500;
    border-radius: var(--z-radius-pill);
    border: none; background: transparent;
    cursor: pointer;
    position: relative;
    transition: color .18s var(--z-ease), background .18s var(--z-ease);
}
.z-topbar-link:hover {
    text-decoration: none;
    background: rgba(15, 23, 36, 0.05);
    color: var(--z-text);
}
.z-topbar-link.is-active { color: var(--z-text); }
.z-topbar-link.is-active::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 3px;
    height: 2px; background: var(--z-text); border-radius: 2px;
    animation: z-underline-grow .32s var(--z-ease-out) both;
}
@keyframes z-underline-grow {
    from { transform: scaleX(0); opacity: 0; }
    to   { transform: scaleX(1); opacity: 1; }
}

.z-topbar-user {
    color: var(--z-text-muted);
    font-size: 14px;
    padding-right: 4px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
    gap: 1px;
}
.z-topbar-user-email {
    font-size: 11px;
    color: var(--z-text-muted);
    opacity: 0.75;
}
.z-user-email {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--z-text-muted);
    opacity: 0.8;
    margin-top: 1px;
}
.z-inline-form { display: inline; margin: 0; }

@media (max-width: 640px) {
    .z-topbar-nav { display: none; }
    .z-topbar-inner { grid-template-columns: auto 1fr; }
}

/* Full-width flat variant — used on logged-in guest-layout pages like
   /site/welcome so the topbar matches the dashboard chrome instead of the
   centered pill used on the public landing. */
.z-topbar--wide {
    padding: 0;
}
.z-topbar--wide .z-topbar-inner {
    max-width: none;
    margin: 0;
    padding: 8px 24px;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-bottom: 1px solid #E5E9EE;
    border-radius: 0;
    box-shadow: none;
    min-height: 64px;
}
.z-topbar--wide .z-brand-mark--img {
    width: 72px;
    height: 72px;
}
@media (max-width: 640px) {
    .z-topbar--wide .z-brand-mark--img {
        width: 56px;
        height: 56px;
    }
}

/* ============================================================
   3. Main / footer
   ============================================================ */
.z-main { flex: 1; position: relative; }
.z-footer {
    padding: 40px 24px 24px;
    color: var(--z-text-muted);
    font-size: 13px;
}
.z-footer-inner {
    max-width: 1180px; margin: 0 auto;
    text-align: center;
}

/* ============================================================
   4. Buttons
   ============================================================ */
.z-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--z-radius-pill);
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .18s var(--z-ease-back),
                box-shadow .22s var(--z-ease),
                background .18s var(--z-ease),
                color .18s var(--z-ease);
    position: relative;
    isolation: isolate;
}
.z-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.z-btn:active { transform: translateY(1px) scale(.98); }

.z-btn-primary {
    background: linear-gradient(135deg, var(--z-primary) 0%, var(--z-primary-light) 100%);
    color: #fff;
    box-shadow: var(--z-shadow-primary);
    overflow: hidden;
}
.z-btn-primary::before {
    /* Sheen that sweeps across on hover */
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(100deg,
        transparent 25%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 75%);
    transform: translateX(-120%);
    transition: transform .9s var(--z-ease-out);
    pointer-events: none;
    z-index: -1;
}
.z-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(30, 42, 120, 0.42);
    filter: brightness(1.05);
}
.z-btn-primary:hover:not(:disabled)::before { transform: translateX(120%); }
.z-btn-primary .z-btn-arrow { transition: transform .3s var(--z-ease-out); }
.z-btn-primary:hover:not(:disabled) .z-btn-arrow { transform: translateX(4px); }
.z-btn-primary.z-btn-lg {
    animation: z-cta-breathe 3.4s ease-in-out infinite;
}
@keyframes z-cta-breathe {
    0%, 100% { box-shadow: 0 12px 32px rgba(30, 42, 120, 0.32); }
    50%      { box-shadow: 0 16px 42px rgba(30, 42, 120, 0.48), 0 0 0 6px rgba(30, 42, 120, 0.08); }
}
.z-btn-primary.z-btn-lg:hover:not(:disabled) { animation: none; }

.z-btn-outline {
    color: var(--z-primary);
    border-color: var(--z-primary);
    background: transparent;
}
.z-btn-outline:hover:not(:disabled) { background: var(--z-primary-soft); transform: translateY(-1px); }

.z-btn-ghost { color: var(--z-text); }
.z-btn-ghost:hover:not(:disabled) { background: rgba(15,23,36,.06); }

.z-btn-text { color: var(--z-primary); }
.z-btn-text:hover:not(:disabled) { text-decoration: underline; background: transparent; }

.z-btn-lg { padding: 15px 30px; font-size: 15px; }
.z-btn-block { width: 100%; }
.z-btn-send { height: 46px; padding: 0 22px; }
.z-btn-sm { padding: 7px 14px; font-size: 13px; }

.z-btn-topbar {
    padding: 8px 18px; font-size: 14px;
    background: var(--z-primary-soft);
    color: var(--z-primary);
    border-radius: var(--z-radius-pill);
}
.z-btn-topbar:hover:not(:disabled) {
    background: #d5dcf9;
    transform: translateY(-1px);
}

.z-btn-arrow {
    width: 16px; height: 16px;
    display: inline-block;
    transition: transform .28s var(--z-ease-back);
}
.z-btn:hover .z-btn-arrow { transform: translateX(4px); }

/* ============================================================
   5. Chips / alerts
   ============================================================ */
.z-chip {
    display: inline-flex; align-items: center;
    padding: 9px 18px;
    border-radius: var(--z-radius-pill);
    background: var(--z-bg-panel);
    color: var(--z-text);
    font-size: 14px; font-weight: 500;
    border: 1px solid var(--z-border);
    cursor: pointer;
    transition: transform .18s var(--z-ease-back),
                border-color .18s var(--z-ease),
                box-shadow .18s var(--z-ease),
                color .18s var(--z-ease);
    box-shadow: var(--z-shadow-sm);
}
.z-chip:hover {
    transform: translateY(-2px);
    border-color: var(--z-primary);
    color: var(--z-primary);
    box-shadow: 0 8px 20px rgba(30, 42, 120, 0.12);
}
.z-chip-primary {
    background: var(--z-primary-soft);
    color: var(--z-primary);
    border-color: transparent;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 6px 14px;
    cursor: default;
    box-shadow: none;
}
.z-chip-primary:hover { transform: none; border-color: transparent; color: var(--z-primary); }

.z-chip-row {
    display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.z-muted { color: var(--z-text-muted); font-weight: 400; }

.z-alert {
    max-width: 900px; margin: 12px auto;
    padding: 12px 16px;
    border-radius: var(--z-radius-md);
    font-size: 14px;
    animation: z-fade-up .35s var(--z-ease-out) both;
}
.z-alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.z-alert-success { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.z-alert-info    { background: #e0e7ff; color: #3730a3; border: 1px solid #a5b4fc; }

/* ============================================================
   6. Hero
   ============================================================ */
.z-hero {
    position: relative;
    padding: 80px 24px 40px;
    overflow: hidden;
}
.z-hero-grid {
    max-width: 1180px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    position: relative; z-index: 2;
}
@media (min-width: 980px) {
    .z-hero-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        gap: 56px;
    }
    .z-hero-inner { text-align: left; align-items: flex-start; margin: 0; }
    .z-hero-inner .z-hero-cta,
    .z-hero-inner .z-chip-row { justify-content: flex-start; }
}
.z-hero-inner {
    max-width: 620px; margin: 0 auto;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 18px;
    position: relative; z-index: 2;
}
.z-hero-inner > * {
    animation: z-fade-up .7s var(--z-ease-out) both;
}
.z-hero-inner > *:nth-child(1) { animation-delay: .05s; }
.z-hero-inner > *:nth-child(2) { animation-delay: .12s; }
.z-hero-inner > *:nth-child(3) { animation-delay: .22s; }
.z-hero-inner > *:nth-child(4) { animation-delay: .32s; }
.z-hero-inner > *:nth-child(5) { animation-delay: .42s; }
.z-hero-inner > *:nth-child(6) { animation-delay: .5s; }
.z-hero-inner > *:nth-child(7) { animation-delay: .58s; }

.z-hero-eyebrow {
    font-family: var(--z-font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(28px, 4vw, 42px);
    color: var(--z-text-muted);
    letter-spacing: -0.015em;
    margin: 0;
    line-height: 1;
}
.z-hero-title {
    font-family: var(--z-font-serif);
    font-weight: 500;
    font-size: clamp(44px, 7.5vw, 76px);
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--z-text);
    margin: 0;
}
.z-hero-title-accent {
    background: linear-gradient(90deg,
        var(--z-primary) 0%,
        var(--z-shape-orange) 35%,
        var(--z-primary-light) 65%,
        var(--z-primary) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: z-gradient-slide 7s ease-in-out infinite;
}
@keyframes z-gradient-slide {
    0%, 100% { background-position:   0% 50%; }
    50%      { background-position: 100% 50%; }
}
.z-hero-sub {
    color: var(--z-text-muted);
    font-size: 17px;
    max-width: 540px;
    margin: 4px 0 6px;
    line-height: 1.6;
}
.z-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 4px 0; }

.z-hero-topics-label {
    font-size: 13px;
    color: var(--z-text-muted);
    font-weight: 600;
    margin-top: 10px;
}

.z-hero-alt {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--z-text-muted);
    font-size: 14px;
    margin-top: 22px;
    position: relative;
}
.z-hero-alt a {
    color: var(--z-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}
.z-hero-alt-arrow {
    position: absolute;
    right: -80px; top: 18px;
    width: 68px; height: 46px;
    pointer-events: none;
    color: var(--z-primary);
    animation: z-arrow-wobble 3s ease-in-out infinite;
}
@keyframes z-arrow-wobble {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    50%      { transform: rotate(-3deg) translateX(-2px); }
}
@media (max-width: 640px) {
    .z-hero-alt-arrow { display: none; }
}

/* ------------------- Decorative floating shapes ------------------- */
.z-shapes {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.z-shape {
    position: absolute;
    filter: drop-shadow(0 12px 30px rgba(15, 23, 36, 0.10));
    will-change: transform, translate;
    /* JS parallax writes --z-px / --z-py; `translate` composes with the keyframe `transform`. */
    translate: var(--z-px, 0) var(--z-py, 0);
    transition: translate .4s var(--z-ease-out);
}
.z-shape-diamond {
    width: 110px; height: 110px;
    background: var(--z-shape-cyan);
    left: 6%; top: 26%;
    transform: rotate(45deg);
    border-radius: 14px;
    animation: z-float-1 8s ease-in-out infinite;
}
.z-shape-triangle-yellow {
    left: 12%; top: 62%;
    width: 0; height: 0;
    border-left: 42px solid transparent;
    border-right: 42px solid transparent;
    border-bottom: 74px solid var(--z-shape-yellow);
    transform: rotate(-20deg);
    animation: z-float-2 7s ease-in-out infinite;
}
.z-shape-circle {
    right: 7%; top: 10%;
    width: 80px; height: 80px;
    background: var(--z-shape-orange);
    border-radius: 50%;
    animation: z-float-3 9s ease-in-out infinite;
}
.z-shape-triangle-green {
    right: 4%; top: 36%;
    width: 0; height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 90px solid var(--z-shape-green);
    transform: rotate(30deg);
    animation: z-float-1 10s ease-in-out infinite reverse;
}
.z-shape-rect-blue {
    right: 10%; top: 66%;
    width: 48px; height: 82px;
    background: var(--z-primary);
    border-radius: 10px;
    transform: rotate(20deg);
    animation: z-float-2 11s ease-in-out infinite;
}

@keyframes z-float-1 {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50%      { transform: rotate(48deg) translateY(-16px); }
}
@keyframes z-float-2 {
    0%, 100% { transform: rotate(-20deg) translateY(0); }
    50%      { transform: rotate(-22deg) translateY(-14px); }
}
@keyframes z-float-3 {
    0%, 100% { transform: translateY(0) translateX(0); }
    50%      { transform: translateY(-18px) translateX(6px); }
}
/* Green triangle uses z-float-1 reverse, so it inherits the rotate(45deg) — override */
.z-shape-triangle-green {
    animation: z-float-tri-green 10s ease-in-out infinite;
}
@keyframes z-float-tri-green {
    0%, 100% { transform: rotate(30deg) translateY(0); }
    50%      { transform: rotate(33deg) translateY(-18px); }
}
.z-shape-rect-blue {
    animation: z-float-rect 11s ease-in-out infinite;
}
@keyframes z-float-rect {
    0%, 100% { transform: rotate(20deg) translateY(0); }
    50%      { transform: rotate(23deg) translateY(-12px); }
}

@media (max-width: 900px) {
    .z-shape-triangle-yellow,
    .z-shape-triangle-green,
    .z-shape-rect-blue { display: none; }
    .z-shape-diamond { width: 70px; height: 70px; left: -20px; top: 60px; opacity: 0.7; }
    .z-shape-circle  { width: 60px; height: 60px; right: -20px; top: 40px; opacity: 0.7; }
}
@media (min-width: 980px) {
    /* Hero now has a visual column on the right — keep that area clear */
    .z-shape-circle,
    .z-shape-triangle-green,
    .z-shape-rect-blue { display: none; }
    .z-shape-diamond          { left: 2%; top: 12%; opacity: 0.75; }
    .z-shape-triangle-yellow  { left: 4%; top: 72%; opacity: 0.75; }
}

/* ------------------- Hero visual column (image + floating chips) ------------------- */
.z-hero-visual {
    position: relative;
    display: none; /* mobile: hidden to save vertical space; shown at >= 760px */
    aspect-ratio: 4 / 5;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    animation: z-fade-up .9s var(--z-ease-out) both;
    animation-delay: .35s;
}
@media (min-width: 760px) {
    .z-hero-visual { display: block; }
}
.z-hero-visual-frame {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 32px;
    overflow: hidden;
    box-shadow:
        0 32px 60px rgba(15, 23, 36, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    transform: rotate(-2deg);
    transition: transform .6s var(--z-ease-out);
}
.z-hero-visual-frame::after {
    /* Soft brand wash to tie the photo to the palette */
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(160deg,
        rgba(30, 42, 120, 0.0) 20%,
        rgba(30, 42, 120, 0.18) 80%,
        rgba(246, 137, 60, 0.22) 100%);
    mix-blend-mode: multiply;
    pointer-events: none;
}
.z-hero-visual-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.4s var(--z-ease-out);
}
.z-hero-visual:hover .z-hero-visual-frame { transform: rotate(0deg); }
.z-hero-visual:hover .z-hero-visual-img   { transform: scale(1.04); }

/* Decorative frame backdrop — a tilted bluish rectangle peeking behind */
.z-hero-visual::before {
    content: "";
    position: absolute;
    inset: -14px -22px 20px 14px;
    background: linear-gradient(135deg, var(--z-primary-soft) 0%, rgba(145, 216, 236, 0.5) 100%);
    border-radius: 36px;
    transform: rotate(4deg);
    z-index: -1;
}

/* Floating overlay chips — glassy little cards that look like the product */
.z-hero-chip {
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 36, 0.16);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--z-text);
    display: inline-flex; align-items: center; gap: 8px;
    animation: z-chip-bob 4.5s ease-in-out infinite;
}
.z-hero-chip--phase {
    top: 8%; left: -14px;
    color: var(--z-primary);
    animation-delay: .2s;
}
.z-hero-chip-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--z-shape-green);
    box-shadow: 0 0 0 3px rgba(64, 181, 88, 0.22);
    animation: z-dot-pulse 1.8s ease-in-out infinite;
}
.z-hero-chip--score {
    bottom: 18%; right: -16px;
    padding: 12px 16px;
    animation-delay: .6s;
}
.z-hero-chip--score strong {
    font-family: var(--z-font-serif);
    font-size: 24px;
    font-weight: 500;
    color: var(--z-primary);
    letter-spacing: -0.01em;
    line-height: 1;
}
.z-hero-chip-sub {
    color: var(--z-text-muted);
    font-weight: 500;
    font-size: 11.5px;
}
.z-hero-chip--msg {
    bottom: -14px; left: 8%;
    max-width: 260px;
    font-weight: 500;
    font-size: 12.5px;
    color: var(--z-text);
    line-height: 1.4;
    animation-delay: 1s;
}
.z-hero-chip-ava {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--z-primary) 0%, var(--z-primary-light) 100%);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(30, 42, 120, 0.3);
}
@keyframes z-chip-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
@keyframes z-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(64, 181, 88, 0.22); }
    50%      { box-shadow: 0 0 0 6px rgba(64, 181, 88, 0.08); }
}
@media (max-width: 979px) {
    .z-hero-visual { max-width: 400px; margin-top: 20px; }
    .z-hero-chip--msg { max-width: 220px; }
}

/* ============================================================
   6b. Section heads (shared across features / future sections)
   ============================================================ */
.z-section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--z-primary);
    background: var(--z-primary-soft);
    padding: 6px 12px;
    border-radius: var(--z-radius-pill);
    margin: 0 0 14px;
}
.z-section-title {
    font-family: var(--z-font-serif);
    font-weight: 500;
    font-size: clamp(30px, 4.2vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--z-text);
    margin: 0 0 10px;
}
.z-section-sub {
    color: var(--z-text-muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 580px;
    margin: 0 auto 36px;
}

/* ============================================================
   6c. Features / "How it works"
   ============================================================ */
.z-features {
    max-width: 1120px; margin: 72px auto 20px;
    padding: 0 24px;
    text-align: center;
    scroll-margin-top: 80px;
}
.z-features-inner {
    max-width: 1120px; margin: 0 auto;
}
.z-features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: left;
}
.z-feature-card {
    position: relative;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--z-radius-lg);
    padding: 0;
    box-shadow: 0 10px 28px rgba(15, 23, 36, 0.07);
    transition: transform .35s var(--z-ease-out), box-shadow .35s var(--z-ease-out), border-color .35s var(--z-ease-out), opacity .6s var(--z-ease-out);
    overflow: hidden;
    opacity: 0; transform: translateY(26px);
    display: flex; flex-direction: column;
}
.z-feature-img {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--z-primary-soft);
}
.z-feature-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .9s var(--z-ease-out);
}
.z-feature-img::after {
    /* Soft fade so the image feels planted on the card rather than pasted */
    content: "";
    position: absolute; inset: auto 0 0 0;
    height: 40%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.85), transparent);
    pointer-events: none;
}
.z-feature-card:hover .z-feature-img img { transform: scale(1.06); }
.z-feature-body-wrap {
    position: relative; z-index: 1;
    padding: 20px 24px 24px;
    display: flex; flex-direction: column;
}
.z-features.is-visible .z-feature-card { opacity: 1; transform: none; }
.z-features.is-visible .z-feature-card:nth-child(1) { transition-delay: .05s; }
.z-features.is-visible .z-feature-card:nth-child(2) { transition-delay: .18s; }
.z-features.is-visible .z-feature-card:nth-child(3) { transition-delay: .31s; }
.z-feature-card::after {
    /* Soft wash sitting behind the icon in the body area (below the image header) */
    content: "";
    position: absolute;
    top: 140px; right: -50px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, var(--z-primary-soft) 0%, transparent 65%);
    opacity: 0.9;
    pointer-events: none;
    transition: transform .5s var(--z-ease-out), opacity .35s var(--z-ease-out);
    z-index: 0;
}
.z-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 36, 0.12);
    border-color: rgba(30, 42, 120, 0.18);
}
.z-feature-card:hover::after {
    transform: scale(1.1) translate(-10px, 10px);
    opacity: 1;
}
.z-feature-step {
    position: relative; z-index: 1;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--z-primary);
    margin-bottom: 14px;
}
.z-feature-icon {
    position: relative; z-index: 1;
    width: 52px; height: 52px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 16px;
    margin-bottom: 16px;
    color: #fff;
    box-shadow: 0 10px 22px rgba(30, 42, 120, 0.28);
    transition: transform .4s var(--z-ease-back);
}
.z-feature-icon svg { width: 26px; height: 26px; transition: transform .5s var(--z-ease-back); }
.z-feature-card:hover .z-feature-icon { transform: rotate(-6deg) scale(1.08); }
.z-feature-card:hover .z-feature-icon svg { transform: rotate(6deg); }
.z-feature-icon.is-chat  { background: linear-gradient(135deg, var(--z-primary) 0%, var(--z-primary-light) 100%); }
.z-feature-icon.is-score { background: linear-gradient(135deg, var(--z-shape-orange) 0%, #f9a66c 100%); box-shadow: 0 10px 22px rgba(246, 137, 60, 0.32); }
.z-feature-icon.is-map   { background: linear-gradient(135deg, var(--z-shape-green) 0%, #6ad17f 100%); box-shadow: 0 10px 22px rgba(64, 181, 88, 0.32); }
.z-feature-title {
    position: relative; z-index: 1;
    font-family: var(--z-font-serif);
    font-weight: 500;
    font-size: 22px;
    letter-spacing: -0.015em;
    color: var(--z-text);
    margin: 0 0 8px;
}
.z-feature-body {
    position: relative; z-index: 1;
    color: var(--z-text-muted);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
}
@media (max-width: 900px) {
    .z-features { margin: 56px auto 10px; }
    .z-features-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================================================
   7. Stats strip
   ============================================================ */
.z-stats {
    max-width: 1000px; margin: 30px auto 0;
    padding: 0 24px;
}
.z-stats-inner {
    background: var(--z-bg-panel);
    border-radius: var(--z-radius-xl);
    box-shadow: var(--z-shadow-md);
    padding: 26px 32px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    align-items: center;
}
.z-stat {
    display: flex; align-items: baseline; gap: 10px;
    justify-content: center;
    transition: transform .3s var(--z-ease-back);
    cursor: default;
}
.z-stat:hover { transform: translateY(-3px); }
.z-stat-num {
    font-family: var(--z-font-serif);
    font-weight: 400;
    font-size: 36px;
    line-height: 1;
    color: var(--z-text);
    letter-spacing: -0.02em;
    transition: color .2s var(--z-ease);
}
.z-stat:hover .z-stat-num { color: var(--z-primary); }
.z-stat-label {
    font-size: 13px; color: var(--z-text-muted);
    line-height: 1.25;
    max-width: 100px;
    text-align: left;
}
@media (max-width: 720px) {
    .z-stats-inner { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
}

/* ============================================================
   8. "Loved" big blue block
   ============================================================ */
.z-loved {
    max-width: 1000px; margin: 40px auto 60px;
    padding: 0 24px;
}
.z-loved-inner {
    position: relative;
    background: linear-gradient(160deg, var(--z-bg-blue) 0%, var(--z-bg-blue-deep) 100%);
    border-radius: var(--z-radius-xl);
    padding: 44px 32px 40px;
    color: #fff;
    text-align: center;
    box-shadow: var(--z-shadow-lg);
    overflow: hidden;
}
.z-loved-inner::before,
.z-loved-inner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    pointer-events: none;
}
.z-loved-inner::before {
    width: 260px; height: 260px;
    background: var(--z-shape-orange);
    top: -80px; left: -80px;
}
.z-loved-inner::after {
    width: 300px; height: 300px;
    background: var(--z-shape-cyan);
    bottom: -100px; right: -80px;
}
.z-loved-title {
    font-family: var(--z-font-serif);
    font-weight: 400;
    font-size: clamp(26px, 3.4vw, 36px);
    letter-spacing: -0.015em;
    margin: 0 0 28px;
    position: relative; z-index: 1;
}
.z-loved-track-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    z-index: 1;
}
.z-loved-card {
    position: relative;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--z-radius-xl);
    padding: 42px 36px 34px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 24px 44px rgba(10, 14, 60, 0.28);
    animation: z-fade-swap .5s var(--z-ease-out) both;
    overflow: hidden;
}
.z-loved-card::before {
    /* Decorative quote glyph behind the content */
    content: "\201C";
    position: absolute;
    top: -24px; left: 10px;
    font-family: var(--z-font-serif);
    font-size: 180px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.10);
    pointer-events: none;
    z-index: 0;
}
.z-loved-card > * { position: relative; z-index: 1; }
.z-loved-avatar {
    width: 68px; height: 68px; border-radius: 50%;
    background: linear-gradient(135deg, var(--z-shape-cyan), var(--z-primary-light));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 24px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.z-loved-stars {
    color: var(--z-shape-yellow);
    letter-spacing: 4px;
    font-size: 15px;
}
.z-loved-stars span { display: inline-block; animation: z-star-pop .5s var(--z-ease-back) both; }
.z-loved-stars span:nth-child(1) { animation-delay: .05s; }
.z-loved-stars span:nth-child(2) { animation-delay: .1s; }
.z-loved-stars span:nth-child(3) { animation-delay: .15s; }
.z-loved-stars span:nth-child(4) { animation-delay: .2s; }
.z-loved-stars span:nth-child(5) { animation-delay: .25s; }
@keyframes z-star-pop {
    from { opacity: 0; transform: scale(.3) rotate(-30deg); }
    to   { opacity: 1; transform: scale(1)  rotate(0); }
}

.z-loved-quote {
    font-family: var(--z-font-serif);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.96);
    margin: 6px 0 2px;
    letter-spacing: -0.005em;
    max-width: 480px;
}
.z-loved-author { margin-top: 10px; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.z-loved-role   { font-size: 13px; color: rgba(255, 255, 255, 0.7); }

.z-loved-carousel {
    display: flex; gap: 8px; justify-content: center;
    margin-top: 22px;
    position: relative; z-index: 1;
}
.z-loved-nav {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff; border: none;
    font-size: 20px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .18s var(--z-ease), transform .18s var(--z-ease-back);
}
.z-loved-nav:hover { background: rgba(255, 255, 255, 0.24); transform: scale(1.08); }
.z-loved-nav:active { transform: scale(.95); }

@keyframes z-fade-swap {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ============================================================
   9. Forms
   ============================================================ */
.z-form { padding: 22px 26px 26px; }
.z-form-row { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.z-label { font-size: 13px; font-weight: 600; color: var(--z-text-muted); }
.z-required { color: var(--z-danger); font-weight: 700; margin-left: 2px; }
.z-verify-note { font-size: 11px; font-weight: 400; font-style: italic; }
.z-input, .z-chat-input {
    width: 100%;
    padding: 12px 14px;
    font: inherit; font-size: 14px;
    background: #fff;
    color: var(--z-text);
    border: 1px solid var(--z-border-strong);
    border-radius: var(--z-radius-md);
    outline: none;
    transition: border-color .18s var(--z-ease), box-shadow .18s var(--z-ease);
}
.z-input:focus, .z-chat-input:focus {
    border-color: var(--z-primary);
    box-shadow: 0 0 0 3px rgba(30, 42, 120, 0.15);
}
.z-help { font-size: 12px; color: var(--z-text-muted); }
.z-form-error {
    color: var(--z-danger);
    font-size: 13px;
    margin: 8px 0;
    min-height: 1em;
}

/* ============================================================
   10. Modal
   ============================================================ */
.z-modal {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.z-modal[hidden] { display: none !important; }
.z-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 36, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: z-fade-in .22s ease;
}
.z-modal-panel {
    position: relative;
    background: var(--z-bg-panel);
    border-radius: var(--z-radius-xl);
    width: 92%; max-width: 440px;
    max-height: 92vh; overflow: auto;
    box-shadow: 0 30px 80px rgba(15, 23, 36, 0.28);
    animation: z-modal-in .3s var(--z-ease-back);
}
.z-modal-close {
    position: absolute; top: 14px; right: 16px;
    width: 32px; height: 32px;
    border: none; background: transparent;
    font-size: 22px; line-height: 1; cursor: pointer;
    color: var(--z-text-muted);
    border-radius: 50%;
    transition: background .15s var(--z-ease), color .15s var(--z-ease);
}
.z-modal-close:hover { background: rgba(15,23,36,.06); color: var(--z-text); }
.z-modal-header { padding: 28px 28px 6px; }
.z-modal-title {
    margin: 0 0 6px; font-size: 24px;
    font-family: var(--z-font-serif);
    font-weight: 500;
    letter-spacing: -0.015em;
}
.z-modal-sub { margin: 0; color: var(--z-text-muted); font-size: 14px; }

.z-tabs {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--z-border);
    padding: 0 26px;
    margin-top: 12px;
}
.z-tab {
    flex: 1;
    padding: 10px 12px;
    font: inherit; font-weight: 600; font-size: 14px;
    color: var(--z-text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color .18s var(--z-ease), border-color .18s var(--z-ease);
}
.z-tab:hover { color: var(--z-text); }
.z-tab.is-active { color: var(--z-primary); border-bottom-color: var(--z-primary); }

@keyframes z-fade-in {
    from { opacity: 0 }
    to   { opacity: 1 }
}
@keyframes z-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
@keyframes z-fade-down {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: none; }
}
@keyframes z-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to   { opacity: 1; transform: none; }
}

/* Scroll reveal (added by common.js) */
.z-reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity .8s var(--z-ease-out), transform .8s var(--z-ease-out);
}
.z-reveal.is-visible { opacity: 1; transform: none; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .z-reveal { opacity: 1; transform: none; }
}

/* ============================================================
   11. Survey / chat
   ============================================================ */
.z-survey {
    max-width: 900px; margin: 0 auto;
    padding: 32px 24px;
    display: flex; flex-direction: column; gap: 16px;
}
.z-timer {
    position: fixed;
    top: 104px;
    right: 16px;
    z-index: 60;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: var(--z-bg-panel, #fff);
    color: var(--z-text, #111);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.z-timer-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--z-text-muted, #666);
}
.z-timer-value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    font-weight: 700;
    font-size: 15px;
}
.z-timer-warn {
    background: #fff6e5;
    color: #8a5a00;
    box-shadow: 0 6px 20px rgba(214, 149, 0, 0.25);
}
.z-timer-warn .z-timer-label { color: #8a5a00; }
.z-timer-danger {
    background: #ffe8e8;
    color: #a40000;
    box-shadow: 0 6px 20px rgba(200, 0, 0, 0.3);
    animation: z-timer-pulse 1s ease-in-out infinite;
}
.z-timer-danger .z-timer-label { color: #a40000; }
@keyframes z-timer-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
@media (max-width: 640px) {
    .z-timer {
        top: 88px; right: 8px;
        padding: 8px 10px;
    }
    .z-timer-label { display: none; }
}
.z-mode-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(10, 15, 30, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .2s ease;
}
.z-mode-modal.is-visible { opacity: 1; }
.z-mode-modal-panel {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 28px;
    max-width: 520px;
    width: 100%;
    transform: translateY(10px);
    transition: transform .2s ease;
}
.z-mode-modal.is-visible .z-mode-modal-panel { transform: translateY(0); }
.z-mode-modal-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: var(--z-text, #111);
}
.z-mode-modal-sub {
    margin: 0 0 20px;
    color: var(--z-text-muted, #5b6478);
    font-size: 14px;
}
.z-mode-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.z-mode-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding: 16px 18px;
    background: #f6f7fb;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.z-mode-option:hover {
    border-color: var(--z-primary, #1e2ee6);
    background: #fff;
}
.z-mode-option:active { transform: scale(0.995); }
.z-mode-option-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--z-text, #111);
}
.z-mode-option-sub {
    font-size: 13px;
    color: var(--z-text-muted, #5b6478);
    line-height: 1.4;
}
.z-mode-option-note {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #a05a00;
    background: #fff6e5;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
    align-self: flex-start;
}
.z-toast {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 70;
    max-width: 320px;
    padding: 12px 16px;
    background: #1f2937;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.z-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 640px) {
    .z-toast {
        top: 56px;
        right: 8px;
        left: 8px;
        max-width: none;
    }
}
.z-survey-heading {
    text-align: center;
    margin: 0 0 8px;
    animation: z-fade-up .5s var(--z-ease-out) both;
}
.z-survey-heading h1 {
    font-family: var(--z-font-serif);
    font-weight: 500;
    font-size: clamp(28px, 4vw, 42px);
    margin: 0;
    letter-spacing: -0.02em;
}
.z-survey-heading p { color: var(--z-text-muted); margin: 6px 0 0; }

.z-stepper {
    background: var(--z-bg-panel);
    padding: 20px 24px;
    border-radius: var(--z-radius-lg);
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    box-shadow: var(--z-shadow-sm);
    animation: z-fade-up .55s var(--z-ease-out) .05s both;
}
.z-step { display: flex; align-items: center; gap: 10px; flex: 1; }
.z-step-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 999px;
    background: var(--z-primary-soft); color: var(--z-primary);
    font-weight: 700; font-size: 14px;
    flex-shrink: 0;
    transition: background .3s var(--z-ease), color .3s var(--z-ease), transform .3s var(--z-ease-back), box-shadow .3s var(--z-ease);
}
.z-step-label {
    font-size: 14px; color: var(--z-text-muted);
    transition: color .2s var(--z-ease);
}
.z-step.is-active .z-step-dot {
    background: var(--z-primary); color: #fff;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(30, 42, 120, 0.35);
}
.z-step.is-active .z-step-label { color: var(--z-text); font-weight: 600; }
.z-step.is-done .z-step-dot { background: var(--z-success); color: #fff; }
.z-step.is-done .z-step-label { color: var(--z-text); }

.z-chat-panel {
    background: var(--z-bg-panel);
    border-radius: var(--z-radius-lg);
    padding: 20px;
    min-height: 420px;
    display: flex; flex-direction: column;
    box-shadow: var(--z-shadow-sm);
    animation: z-fade-up .6s var(--z-ease-out) .1s both;
}
.z-chat-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    max-height: 60vh;
}
.z-chat-list { display: flex; flex-direction: column; gap: 14px; }
.z-chat-loading { display: grid; place-items: center; padding: 60px 0; }
.z-chat-error {
    color: var(--z-danger);
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: var(--z-radius-sm);
    font-size: 13px;
    margin-top: 8px;
    animation: z-fade-up .3s var(--z-ease-out) both;
}

.z-chat-msg {
    display: flex; gap: 10px; align-items: flex-end;
    animation: z-msg-in .35s var(--z-ease-out) both;
}
.z-chat-msg.is-user { justify-content: flex-end; animation-name: z-msg-in-right; }
@keyframes z-msg-in {
    from { opacity: 0; transform: translateY(8px) translateX(-6px); }
    to   { opacity: 1; transform: none; }
}
@keyframes z-msg-in-right {
    from { opacity: 0; transform: translateY(8px) translateX(6px); }
    to   { opacity: 1; transform: none; }
}
.z-chat-avatar {
    width: 34px; height: 34px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; font-weight: 700;
    flex-shrink: 0;
}
.z-chat-avatar-bot  { background: var(--z-primary); }
.z-chat-avatar-user { background: var(--z-shape-orange); }

.z-chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--z-primary-softer);
    color: var(--z-text);
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 15px;
}
.z-chat-msg.is-user .z-chat-bubble { background: var(--z-primary); color: #fff; }

.z-chat-bubble-thinking { display: inline-flex; align-items: center; gap: 8px; color: var(--z-text-muted); }

.z-chat-form {
    background: var(--z-bg-panel);
    border-radius: var(--z-radius-pill);
    padding: 6px 6px 6px 20px;
    display: flex; gap: 8px; align-items: center;
    box-shadow: var(--z-shadow-sm);
    animation: z-fade-up .65s var(--z-ease-out) .15s both;
}
.z-chat-input {
    resize: none;
    min-height: 44px; max-height: 160px;
    border: none;
    padding: 10px 4px;
    background: transparent;
}
.z-chat-input:focus { box-shadow: none; }
.z-chat-form .z-btn-send { border-radius: var(--z-radius-pill); }
.z-chat-form .z-btn-done {
    height: 46px;
    padding: 0 18px;
    border-radius: var(--z-radius-pill);
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--z-border, rgba(0, 0, 0, 0.12));
    background: transparent;
    color: var(--z-text-muted, #5b6478);
    cursor: pointer;
}
.z-chat-form .z-btn-done:hover {
    background: var(--z-primary-soft, rgba(30, 42, 120, 0.08));
    color: var(--z-primary, #1e2ee6);
    border-color: var(--z-primary, #1e2ee6);
}

/* Mic button — dictate into chat input via Web Speech API */
.z-btn-mic {
    width: 42px; height: 42px; padding: 0; flex: 0 0 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--z-bg-panel, #f3f5f9);
    border: 1px solid var(--z-border, #e5e9f2);
    color: var(--z-text-muted, #5b6478);
    cursor: pointer;
    transition: background .15s var(--z-ease-out), color .15s var(--z-ease-out), transform .15s var(--z-ease-out);
}
.z-btn-mic:hover { background: #e7ecf5; color: var(--z-text, #0f172a); }
.z-chat-mic-icon { display: block; }
.z-btn-mic.is-recording {
    background: #ef4444; color: #fff; border-color: #ef4444;
    animation: z-mic-pulse 1.1s var(--z-ease-out) infinite;
}
.z-btn-mic.is-recording:hover { background: #dc2626; color: #fff; }
@keyframes z-mic-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); }
    70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* TTS auto-speak toggle (next to mic) */
.z-btn-tts-toggle .z-tts-wave { opacity: 0; transition: opacity .15s var(--z-ease-out); }
.z-btn-tts-toggle.is-on {
    background: var(--z-primary, #1e2ee6); color: #fff; border-color: var(--z-primary, #1e2ee6);
}
.z-btn-tts-toggle.is-on:hover { background: var(--z-primary-deep, #141db1); color: #fff; }
.z-btn-tts-toggle.is-on .z-tts-wave-1 { opacity: 1; }
.z-btn-tts-toggle.is-on.is-speaking .z-tts-wave-2 {
    opacity: 1; animation: z-tts-wave-fade 1s var(--z-ease-out) infinite;
}
@keyframes z-tts-wave-fade {
    0%, 100% { opacity: .3; }
    50%      { opacity: 1; }
}

/* Per-bubble replay button (bot messages only) */
.z-chat-tts-btn {
    appearance: none; background: transparent; border: none; cursor: pointer;
    width: 26px; height: 26px; padding: 0; margin: 0 0 2px 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--z-text-muted, #5b6478);
    opacity: .55;
    transition: opacity .15s var(--z-ease-out), background .15s var(--z-ease-out), color .15s var(--z-ease-out);
    flex-shrink: 0;
}
.z-chat-msg:hover .z-chat-tts-btn { opacity: 1; }
.z-chat-tts-btn:hover { background: var(--z-primary-softer, #eef1fd); color: var(--z-primary, #1e2ee6); opacity: 1; }
.z-chat-tts-btn.is-playing {
    background: var(--z-primary, #1e2ee6); color: #fff; opacity: 1;
    animation: z-mic-pulse 1.1s var(--z-ease-out) infinite;
}

.z-chat-done { display: flex; justify-content: center; padding: 8px 0; }

/* MCQ answer options — radio-dot boxes stacked under the latest bot bubble,
   right-aligned so they sit on the user's side of the conversation. Clicking
   a row fills the dot and submits the option text as the user's reply. */
.z-chat-choices {
    display: flex; flex-direction: column; gap: 8px;
    align-items: flex-end;           /* right-align the stack */
    margin: 6px 46px 4px 46px;       /* line up with the bubble, past the avatar */
    animation: z-msg-in 180ms var(--z-ease-out);
}
.z-chat-choice {
    appearance: none;
    display: flex; align-items: center; gap: 12px;
    width: min(360px, 80%);
    padding: 11px 14px;
    border: 1.5px solid var(--z-border, #e3e6ef);
    background: #fff; color: var(--z-text, #1a1f2e);
    border-radius: 12px;
    font: inherit; font-size: 14px; line-height: 1.35;
    text-align: left; cursor: pointer;
    transition: border-color .15s var(--z-ease-out), background .15s var(--z-ease-out), color .15s var(--z-ease-out), transform .08s var(--z-ease-out), box-shadow .15s var(--z-ease-out);
}
.z-chat-choice::before {
    content: '';
    flex: 0 0 auto;
    width: 18px; height: 18px;
    border: 2px solid var(--z-border, #cfd3df);
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s var(--z-ease-out), background .15s var(--z-ease-out), box-shadow .15s var(--z-ease-out);
}
.z-chat-choice:hover {
    border-color: var(--z-primary, #1e2ee6);
    background: var(--z-primary-softer, #eef1fd);
    color: var(--z-primary, #1e2ee6);
    box-shadow: 0 2px 8px rgba(30, 42, 120, 0.08);
}
.z-chat-choice:hover::before {
    border-color: var(--z-primary, #1e2ee6);
}
.z-chat-choice:active { transform: scale(.98); }
.z-chat-choice.is-selected {
    border-color: var(--z-primary, #1e2ee6);
    background: var(--z-primary-softer, #eef1fd);
    color: var(--z-primary, #1e2ee6);
}
.z-chat-choice.is-selected::before {
    border-color: var(--z-primary, #1e2ee6);
    background: var(--z-primary, #1e2ee6);
    box-shadow: inset 0 0 0 3px #fff;    /* inner white ring = filled dot */
}
.z-chat-choice[disabled] { opacity: .55; cursor: default; }
.z-chat-choice[disabled]:hover {
    border-color: var(--z-border, #e3e6ef);
    background: #fff;
    color: var(--z-text, #1a1f2e);
    box-shadow: none;
}
.z-chat-choice[disabled]:hover::before {
    border-color: var(--z-border, #cfd3df);
}
@media (max-width: 520px) {
    .z-chat-choices { margin-left: 40px; margin-right: 10px; }
    .z-chat-choice { width: 100%; font-size: 13.5px; padding: 10px 12px; }
}

/* Typing indicator dots */
.z-typing {
    display: inline-flex; gap: 4px; align-items: center;
    padding-left: 2px;
}
.z-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--z-text-muted);
    animation: z-typing-bounce 1.2s infinite;
}
.z-typing span:nth-child(2) { animation-delay: .15s; }
.z-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes z-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%           { transform: translateY(-6px); opacity: 1; }
}

/* ============================================================
   12. Spinner
   ============================================================ */
.z-spinner {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 3px solid var(--z-border);
    border-top-color: var(--z-primary);
    animation: z-spin .9s linear infinite;
}
.z-spinner-sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes z-spin { to { transform: rotate(360deg); } }

/* ============================================================
   13. Report card
   ============================================================ */
.z-report {
    background: var(--z-bg-panel);
    border: 1px solid var(--z-primary-light);
    padding: 30px;
    border-radius: var(--z-radius-lg);
    margin-top: 14px;
    box-shadow: var(--z-shadow-md);
    animation: z-fade-up .5s var(--z-ease-out) both;
}
.z-report-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; flex-wrap: wrap;
}
.z-report-title {
    margin: 8px 0 0;
    font-family: var(--z-font-serif); font-weight: 500;
    font-size: 28px; letter-spacing: -0.015em;
    line-height: 1.15;
}
.z-report-score {
    min-width: 180px;
    text-align: right;
}
.z-report-score-label {
    text-transform: uppercase; letter-spacing: 0.08em;
    font-size: 11px; color: var(--z-text-muted);
}
.z-report-score-num {
    font-family: var(--z-font-serif); font-weight: 400;
    font-size: 56px; color: var(--z-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}
.z-report-score-num small { font-size: 20px; color: #999; font-weight: 600; margin-left: 4px; }
.z-report-bar {
    height: 8px; border-radius: 999px;
    background: var(--z-border);
    overflow: hidden;
    margin-top: 6px;
}
.z-report-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--z-primary), var(--z-primary-light));
    animation: z-bar-fill 1.2s var(--z-ease-out) both;
}
@keyframes z-bar-fill {
    from { transform: translateX(-100%); }
    to   { transform: none; }
}
.z-report-divider { height: 1px; background: var(--z-border); margin: 22px 0; }
.z-report-section { margin-bottom: 16px; }
.z-report-section-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.z-report-list { list-style: none; padding: 0; margin: 0; }
.z-report-list li {
    padding: 6px 0 6px 24px;
    position: relative;
    color: var(--z-text);
    font-size: 15px;
}
.z-report-list li::before {
    content: "";
    position: absolute; left: 0; top: 12px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--z-primary);
    opacity: 0.75;
}
.z-report-raw {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    color: var(--z-text-muted);
    font-size: 13px;
    white-space: pre-wrap;
    margin-top: 12px;
}

/* Trait blocks for the detailed personality report */
.z-report-traits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 4px 0 18px;
}
.z-trait-card {
    background: var(--z-primary-softer);
    border-radius: var(--z-radius-lg);
    padding: 14px 16px;
}
.z-trait-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--z-text-muted);
    margin-bottom: 4px;
}
.z-trait-card-value {
    font-family: var(--z-font-serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}
.z-trait-card-sub { font-size: 13px; color: var(--z-text); line-height: 1.45; }

.z-report-bigfive { margin: 4px 0 18px; }
.z-bigfive-row { display: grid; grid-template-columns: 160px 1fr 36px; gap: 10px; align-items: center; margin-bottom: 8px; }
.z-bigfive-label { font-size: 13px; color: var(--z-text); font-weight: 600; }
.z-bigfive-bar {
    height: 8px;
    background: var(--z-primary-softer);
    border-radius: 999px;
    overflow: hidden;
}
.z-bigfive-bar-fill {
    height: 100%;
    background: var(--z-primary);
    border-radius: 999px;
    transition: width .6s var(--z-ease-out);
}
.z-bigfive-num { font-size: 13px; color: var(--z-text-muted); text-align: right; }

/* Recommended careers grid */
.z-career-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin: 4px 0 10px;
}
.z-career-card {
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.z-career-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.z-career-card-title {
    margin: 0;
    font-family: var(--z-font-serif);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
}
.z-demand-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
.z-demand-high   { background: #d1fae5; color: #065f46; }
.z-demand-medium { background: #fef3c7; color: #92400e; }
.z-demand-low    { background: #fee2e2; color: #991b1b; }
.z-career-fit { display: flex; align-items: center; gap: 10px; }
.z-career-fit-bar {
    flex: 1;
    height: 6px;
    background: var(--z-primary-softer);
    border-radius: 999px;
    overflow: hidden;
}
.z-career-fit-fill {
    height: 100%;
    background: var(--z-primary);
    border-radius: 999px;
    transition: width .6s var(--z-ease-out);
}
.z-career-fit-num { font-size: 12px; color: var(--z-text-muted); min-width: 48px; text-align: right; }
.z-career-rationale { margin: 0; font-size: 13px; color: var(--z-text); line-height: 1.5; }

/* English proficiency chips */
.z-eng-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0 10px; }
.z-eng-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--z-primary-softer);
    border-radius: 999px;
    padding: 6px 12px;
}
.z-eng-chip-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--z-text-muted);
    font-weight: 700;
}
.z-eng-chip-val { font-weight: 700; color: var(--z-primary); font-size: 14px; }
.z-eng-summary { margin: 0; color: var(--z-text); font-size: 14px; line-height: 1.5; }

/* Skills breakdown */
.z-skills-group { margin: 0 0 14px; }
.z-skills-group-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--z-text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.z-skills-rows { display: flex; flex-direction: column; gap: 6px; }
.z-skill-row {
    display: grid;
    grid-template-columns: 180px 1fr 40px;
    gap: 10px;
    align-items: center;
}
.z-skill-row .z-skill-notes {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--z-text-muted);
    padding-left: 2px;
    margin-top: -2px;
}
.z-skill-name { font-size: 13px; color: var(--z-text); font-weight: 600; }
.z-skill-bar {
    height: 8px;
    background: var(--z-primary-softer);
    border-radius: 999px;
    overflow: hidden;
}
.z-skill-bar-fill {
    height: 100%;
    background: var(--z-primary);
    border-radius: 999px;
    transition: width .6s var(--z-ease-out);
}
.z-skill-num { font-size: 12px; color: var(--z-text-muted); text-align: right; }

/* Individualised learning path */
.z-lp-overview { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: var(--z-text); }
.z-milestones {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    counter-reset: milestone;
}
.z-milestone {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    padding: 14px;
}
.z-milestone-num {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--z-primary);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.z-milestone-body { flex: 1; }
.z-milestone-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.z-milestone-title { margin: 0; font-family: var(--z-font-serif); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.z-milestone-weeks { font-size: 12px; color: var(--z-text-muted); font-weight: 600; white-space: nowrap; }
.z-milestone-focus   { margin: 2px 0; font-size: 13px; color: var(--z-text); line-height: 1.5; }
.z-milestone-outcome { margin: 2px 0 0; font-size: 13px; color: var(--z-text-muted); line-height: 1.5; }
.z-milestone-outcome::before { content: "→ "; color: var(--z-primary); font-weight: 700; }

.z-courses-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--z-text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.z-courses-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.z-course-pill {
    background: var(--z-primary-softer);
    color: var(--z-primary);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
}

/* ============================================================
   13b. Choose assessment screen
   ============================================================ */
.z-choose {
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.z-choose-heading { text-align: center; }
.z-choose-heading h1 {
    font-family: var(--z-font-serif);
    font-weight: 500;
    font-size: clamp(30px, 4.2vw, 44px);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}
.z-choose-heading p { color: var(--z-text-muted); margin: 0; }

.z-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.z-choose-card {
    background: var(--z-bg-panel);
    border-radius: var(--z-radius-xl);
    padding: 28px;
    box-shadow: var(--z-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    transition: transform .25s var(--z-ease), box-shadow .25s var(--z-ease);
}
.z-choose-card:hover { transform: translateY(-3px); box-shadow: var(--z-shadow-md); }
.z-choose-card.is-featured {
    border: 2px solid var(--z-primary);
    background: linear-gradient(180deg, var(--z-primary-softer) 0%, var(--z-bg-panel) 55%);
}
.z-choose-tag {
    align-self: flex-start;
    background: var(--z-primary-softer);
    color: var(--z-primary);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.z-choose-tag.is-featured { background: var(--z-primary); color: #fff; }
.z-choose-title {
    font-family: var(--z-font-serif);
    font-weight: 600;
    font-size: 26px;
    margin: 0;
    letter-spacing: -0.01em;
}
.z-choose-sub { color: var(--z-text-muted); margin: 0; }
.z-choose-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.z-choose-list li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    color: var(--z-text);
}
.z-choose-list li::before {
    content: "✓";
    position: absolute; left: 0; top: 0;
    color: var(--z-primary);
    font-weight: 700;
}
.z-choose-form { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.z-choose-field { display: flex; flex-direction: column; gap: 6px; }
.z-choose-field-label { font-size: 13px; font-weight: 600; color: var(--z-text); }
.z-choose-field-hint { font-size: 12px; color: var(--z-text-muted); }
.z-choose-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-sm);
    background: #fff;
    font: inherit;
    color: var(--z-text);
    transition: border-color .2s var(--z-ease), box-shadow .2s var(--z-ease);
}
.z-choose-select:focus {
    outline: none;
    border-color: var(--z-primary);
    box-shadow: 0 0 0 3px var(--z-primary-softer);
}

.z-choose-duration { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.z-choose-duration-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.z-choose-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color .18s var(--z-ease), background .18s var(--z-ease), box-shadow .18s var(--z-ease);
}
.z-choose-chip input { position: absolute; opacity: 0; pointer-events: none; }
.z-choose-chip:hover { border-color: var(--z-primary); }
.z-choose-chip:has(input:checked) {
    border-color: var(--z-primary);
    background: var(--z-primary-softer);
    box-shadow: 0 0 0 3px var(--z-primary-softer);
}
.z-choose-chip-mins { font-weight: 700; font-size: 15px; color: var(--z-text); }
.z-choose-chip-label { font-size: 12px; color: var(--z-text-muted); }

/* Temporarily-unavailable states on the Choose page */
.z-choose-card.is-disabled {
    position: relative;
    opacity: 0.55;
    pointer-events: none;
    filter: grayscale(0.3);
}
.z-choose-card.is-disabled .z-btn[disabled] { cursor: not-allowed; opacity: 0.7; }
.z-choose-unavailable-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--z-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: var(--z-radius-pill);
    text-transform: uppercase;
}
.z-choose-chip.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f7f8fc;
}
.z-choose-chip-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--z-danger);
    background: #fde3e3;
    border-radius: var(--z-radius-pill);
    vertical-align: middle;
}

/* MHQ band distribution rows on admin dashboard */
.z-mhq-band-rows { display: flex; flex-direction: column; gap: 6px; }
.z-mhq-band-row {
    display: grid;
    grid-template-columns: 90px 1fr 80px;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}
.z-mhq-band-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.z-mhq-band-track { position: relative; height: 10px; background: #eef0f6; border-radius: 999px; overflow: hidden; }
.z-mhq-band-fill  { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.z-mhq-band-num   { text-align: right; font-weight: 600; color: var(--z-text); }

.z-admin-table--compact td, .z-admin-table--compact th { padding: 8px 10px; font-size: 12.5px; }

/* ============================================================
   Admin — Flat / Tree view toggle, used on /admin/surveys and
   anywhere else that benefits from a group-by-user drill-down.
   ============================================================ */
.z-view-toggle {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-pill);
    background: #fff;
    gap: 2px;
    flex-shrink: 0;
}
.z-view-toggle-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    font-size: 13px; font-weight: 600;
    color: var(--z-text-muted);
    border-radius: var(--z-radius-pill);
    text-decoration: none;
    transition: background .18s var(--z-ease), color .18s var(--z-ease);
}
.z-view-toggle-btn:hover { color: var(--z-text); background: #f3f5fb; }
.z-view-toggle-btn.is-active {
    color: #fff;
    background: var(--z-primary);
    box-shadow: 0 2px 6px rgba(var(--z-primary-rgb), 0.3);
}
.z-view-toggle-btn svg { width: 14px; height: 14px; }

/* Tree list — one user per <details>; sessions expand underneath. */
.z-tree-list { display: flex; flex-direction: column; gap: 8px; }
.z-tree-user {
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    background: var(--z-bg-panel);
    overflow: hidden;
    transition: border-color .18s var(--z-ease), box-shadow .18s var(--z-ease);
}
.z-tree-user[open] { border-color: var(--z-primary); box-shadow: 0 6px 20px rgba(15,23,36,0.06); }
.z-tree-user-head {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.z-tree-user-head::-webkit-details-marker { display: none; }
.z-tree-caret {
    display: inline-block;
    font-size: 10px;
    color: var(--z-text-dim);
    transition: transform .18s var(--z-ease);
    flex-shrink: 0;
    width: 14px;
}
.z-tree-user[open] .z-tree-caret { transform: rotate(90deg); color: var(--z-primary); }
.z-tree-user-avatar {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--z-primary-softer);
    color: var(--z-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
.z-tree-user-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.z-tree-user-name { font-weight: 600; color: var(--z-text); font-size: 14px; }
.z-tree-user-email { font-size: 12px; color: var(--z-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-tree-user-stats { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.z-tree-user-body { padding: 0 14px 12px; }
.z-tree-user-body .z-admin-table-wrap { border-top: 1px solid var(--z-border); margin-top: 2px; }

@media (max-width: 760px) {
    .z-tree-user-head { flex-wrap: wrap; }
    .z-tree-user-stats { width: 100%; justify-content: flex-start; }
}

/* Theme admin page */
.z-theme-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.z-theme-preset-form { margin: 0; }
.z-theme-preset {
    position: relative;
    width: 100%;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    cursor: pointer;
    text-align: left;
    transition: border-color .18s var(--z-ease), transform .18s var(--z-ease), box-shadow .18s var(--z-ease);
    font: inherit;
    color: inherit;
}
.z-theme-preset:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15,23,36,0.08);
    border-color: var(--z-primary);
}
.z-theme-preset.is-active {
    border-color: var(--z-primary);
    background: var(--z-primary-softer);
    box-shadow: 0 0 0 2px var(--z-primary) inset;
}
.z-theme-swatches { display: inline-flex; gap: 2px; flex-shrink: 0; }
.z-theme-swatch {
    display: inline-block;
    width: 14px; height: 36px;
    border-radius: 3px;
    border: 1px solid rgba(15,23,36,0.1);
}
.z-theme-preset-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.z-theme-preset-label { font-weight: 600; color: var(--z-text); }
.z-theme-preset-hex   { font-size: 11.5px; color: var(--z-text-muted); font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.z-theme-preset-tick {
    position: absolute; top: 8px; right: 10px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--z-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}

.z-theme-custom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.z-theme-slot {
    display: flex; flex-direction: column; gap: 6px;
    padding: 12px;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-sm);
    background: #fff;
}
.z-theme-slot-label {
    font-size: 11.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--z-text-muted);
}
.z-theme-slot-controls { display: flex; align-items: center; gap: 8px; }
.z-theme-slot-picker {
    width: 48px; height: 36px; padding: 0;
    border: 1px solid var(--z-border); border-radius: var(--z-radius-sm);
    background: transparent; cursor: pointer; flex-shrink: 0;
}
.z-theme-slot-hex { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; }

/* Choose-card layout reused inside dashboard content area (e.g. admin create). */
.z-choose--admin { max-width: 720px; margin: 0 auto; padding: 8px 0 32px; gap: 20px; }
.z-choose--admin .z-choose-heading { text-align: left; }
.z-choose--admin .z-choose-heading h1 { font-size: clamp(26px, 3vw, 34px); }
.z-choose-grid--single { grid-template-columns: 1fr; }

/* ------------------------------------------------------------
   Accent snapshot (voice) widget
   ------------------------------------------------------------ */
.z-accent {
    margin-top: 16px;
    padding: 20px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-xl);
    box-shadow: var(--z-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: z-fade-up .4s var(--z-ease-out) both;
}
.z-accent-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.z-accent-title { font-family: var(--z-font-serif); font-weight: 600; font-size: 20px; margin: 6px 0 2px; }
.z-accent-sub { color: var(--z-text-muted); margin: 0; font-size: 14px; }
.z-accent-skip { font-size: 13px; }
.z-accent-passage {
    margin: 0;
    padding: 14px 16px;
    background: var(--z-primary-softer);
    border-left: 3px solid var(--z-primary);
    border-radius: var(--z-radius-sm);
    font-size: 15px;
    line-height: 1.55;
    color: var(--z-text);
}
.z-accent-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.z-accent-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #fff; opacity: 0.9;
}
.z-accent-record.is-recording .z-accent-dot {
    background: #ef4444;
    animation: z-accent-pulse 1s infinite;
}
@keyframes z-accent-pulse {
    0%, 100% { transform: scale(1);   opacity: 1;   }
    50%      { transform: scale(1.4); opacity: 0.6; }
}
.z-accent-timer { font-variant-numeric: tabular-nums; color: var(--z-text-muted); font-size: 14px; }
.z-accent-status { color: var(--z-text-muted); font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-accent-transcript { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #f8fafc; border-radius: var(--z-radius-sm); }
.z-accent-transcript-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--z-text-muted); }
.z-accent-transcript-body { font-size: 14px; color: var(--z-text); white-space: pre-wrap; }
.z-accent-transcript-actions { display: flex; gap: 8px; justify-content: flex-end; }
.z-accent-result {
    padding: 14px;
    background: var(--z-primary-softer);
    border-radius: var(--z-radius-sm);
    display: flex; flex-direction: column; gap: 8px;
}
.z-accent-result-head { font-weight: 700; color: var(--z-primary); }
.z-accent-result-foot { margin: 0; font-size: 13px; color: var(--z-text-muted); }
.z-accent-error { color: #b91c1c; font-size: 13px; }

/* English sub-scores + accent block in final report */
.z-eng-subscores { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.z-eng-subscores-label,
.z-eng-accent-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--z-text-muted); font-weight: 700; }
.z-eng-accent { margin-top: 14px; padding: 12px; background: #f8fafc; border-radius: var(--z-radius-sm); display: flex; flex-direction: column; gap: 8px; }
.z-eng-accent.is-skipped { opacity: 0.75; }
.z-eng-accent-detected { font-weight: 600; color: var(--z-text); }
.z-eng-accent-note { margin: 0; font-size: 14px; color: var(--z-text-muted); }
.z-eng-accent-sub-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--z-text-muted); font-weight: 700; margin-bottom: 4px; }
.z-eng-accent-sub ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.z-eng-accent-audio {
    width: 100%;
    margin-top: 4px;
    border-radius: var(--z-radius-sm);
    outline: 1px solid var(--z-border);
}
.z-score-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 10px;
}
.z-score-hero-meta span {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   Leadership readiness block (Harvard ManageMentor tiers)
   ------------------------------------------------------------ */
.z-leader-note { color: var(--z-text-muted); margin: 0 0 12px; font-size: 14px; }
.z-leader { display: flex; flex-direction: column; gap: 16px; }
.z-leader-tier { display: flex; flex-direction: column; gap: 8px; }
.z-leader-tier-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--z-primary);
    font-weight: 700;
}
.z-leader-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.z-leader-row {
    position: relative;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--z-border);
    border-left-width: 4px;
    border-radius: var(--z-radius-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background .18s var(--z-ease), border-color .18s var(--z-ease);
}
.z-leader-row.is-strong  { border-left-color: #16a34a; }
.z-leader-row.is-mid     { border-left-color: #f59e0b; }
.z-leader-row.is-growth  { border-left-color: #ef4444; background: #fef2f2; }
.z-leader-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.z-leader-name { font-weight: 600; font-size: 14px; color: var(--z-text); }
.z-leader-conf {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 999px;
    color: #475569;
    background: #e2e8f0;
}
.z-leader-conf-high   { color: #065f46; background: #d1fae5; }
.z-leader-conf-medium { color: #78350f; background: #fef3c7; }
.z-leader-conf-low    { color: #7f1d1d; background: #fee2e2; }
.z-leader-bar {
    position: relative;
    height: 8px;
    background: rgba(15, 23, 42, 0.07);
    border-radius: 999px;
    overflow: hidden;
}
.z-leader-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--z-primary);
    border-radius: 999px;
}
.z-leader-row.is-strong .z-leader-bar-fill { background: #16a34a; }
.z-leader-row.is-mid    .z-leader-bar-fill { background: #f59e0b; }
.z-leader-row.is-growth .z-leader-bar-fill { background: #ef4444; }
.z-leader-num {
    position: absolute;
    right: -2px;
    top: -16px;
    font-size: 11px;
    color: var(--z-text-muted);
    font-variant-numeric: tabular-nums;
}
.z-leader-rationale { margin: 0; font-size: 13px; color: var(--z-text-muted); line-height: 1.45; }
.z-leader-course {
    align-self: flex-start;
    display: inline-flex;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--z-primary);
    background: var(--z-primary-softer);
    border-radius: 999px;
}
.z-leader-row.is-growth .z-leader-course {
    color: #7f1d1d;
    background: #fee2e2;
}

/* Band filter chips (High / Medium / Low). JS toggles .is-active on each chip
   and .is-hidden on rows whose data-tier is turned off. Empty tier blocks
   collapse via :has(). */
.z-tier-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 0 6px;
}
.z-tier-filter-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--z-text-muted);
    margin-right: 2px;
}
.z-tier-chip {
    display: inline-flex; align-items: center;
    padding: 6px 14px;
    border-radius: var(--z-radius-pill);
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    color: var(--z-text-muted);
    border: 1px solid var(--z-border);
    cursor: pointer;
    transition: background .18s var(--z-ease),
                color .18s var(--z-ease),
                border-color .18s var(--z-ease);
}
.z-tier-chip:hover { color: var(--z-text); border-color: #cbd5e1; }
.z-tier-chip.is-high.is-active { background: #d1fae5; color: #065f46; border-color: #86efac; }
.z-tier-chip.is-mid.is-active  { background: #fef3c7; color: #78350f; border-color: #fcd34d; }
.z-tier-chip.is-low.is-active  { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }

.z-leader-row.is-hidden { display: none; }
/* Collapse a tier block whose rows are all filtered out. */
.z-leader-tier:not(:has(.z-leader-row:not(.is-hidden))) { display: none; }

.z-tier-empty {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--z-text-muted);
    font-style: italic;
}

/* ------------------------------------------------------------
   Resume-session banners (dashboard sidebar + choose + survey)
   ------------------------------------------------------------ */
.z-resume-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border: 1px solid var(--z-primary);
    border-radius: var(--z-radius-xl);
    background: linear-gradient(135deg, var(--z-primary-softer) 0%, #fff 65%);
    box-shadow: var(--z-shadow-sm);
    animation: z-fade-up .4s var(--z-ease-out) both;
}
.z-resume-banner-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.z-resume-banner-title {
    margin: 4px 0 0;
    font-family: var(--z-font-serif);
    font-weight: 500;
    font-size: 22px;
    letter-spacing: -0.015em;
    color: var(--z-text);
}
.z-resume-banner-sub { margin: 0; color: var(--z-text-muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 640px) {
    .z-resume-banner { flex-direction: column; align-items: stretch; text-align: left; }
}

.z-dash-resume {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    margin: 10px 12px 8px;
    border-radius: var(--z-radius-md);
    background: var(--z-primary);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--z-shadow-sm);
    transition: transform .18s var(--z-ease), box-shadow .18s var(--z-ease), filter .18s var(--z-ease);
}
.z-dash-resume:hover { transform: translateY(-1px); box-shadow: var(--z-shadow-md); filter: brightness(1.05); color: #fff; }
.z-dash-resume-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    font-weight: 700;
}
.z-dash-resume-phase { font-weight: 600; font-size: 14px; }
.z-dash-resume-cta { font-size: 12px; opacity: 0.95; margin-top: 2px; }

.z-survey-resume-note {
    margin: 12px 0 0;
    padding: 10px 14px;
    background: var(--z-primary-softer);
    border-radius: var(--z-radius-sm);
    font-size: 14px;
    color: var(--z-text);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   14. Error page
   ============================================================ */
.z-error-card {
    max-width: 640px; margin: 60px auto;
    padding: 40px;
    background: var(--z-bg-panel);
    border-radius: var(--z-radius-xl);
    text-align: center;
    box-shadow: var(--z-shadow-md);
    animation: z-fade-up .5s var(--z-ease-out) both;
}
.z-error-card h1 {
    margin: 0 0 12px;
    font-family: var(--z-font-serif); font-weight: 500;
    font-size: 30px;
    letter-spacing: -0.015em;
}
.z-error-card p { color: var(--z-text-muted); margin: 0 0 22px; }

/* ============================================================
   15. Toasts
   ============================================================ */
.z-toast-stack {
    position: fixed; bottom: 20px; right: 20px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 2000;
}
.z-toast {
    background: var(--z-text);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--z-radius-md);
    box-shadow: var(--z-shadow-md);
    font-size: 14px;
    max-width: 320px;
    animation: z-toast-in .22s var(--z-ease-out);
}
.z-toast-error   { background: var(--z-danger); }
.z-toast-success { background: var(--z-success); }
@keyframes z-toast-in {
    from { opacity: 0; transform: translateY(10px) scale(.95); }
    to   { opacity: 1; transform: none; }
}

/* ============================================================
   15b. Dashboard topbar (demoerp-style sticky white bar)
   ============================================================ */
.z-dash-topbar {
    position: sticky; top: 0;
    background: #fff;
    border-bottom: 1px solid #E5E9EE;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 1030;
    min-height: 56px;
    margin-left: 220px;
}
.z-dash-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.z-dash-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--z-text);
}
.z-dash-topbar-brand:hover { text-decoration: none; }
.z-dash-topbar-mark {
    width: 30px; height: 30px;
    background: var(--z-primary, #1e2ee6);
    color: #fff;
    border-radius: 7px;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.z-dash-topbar-mark--img {
    width: 64px; height: 64px;
    background: transparent;
    object-fit: contain;
    display: block;
    padding: 0;
    border-radius: 10px;
}
.z-dash-topbar-brand-text {
    font-weight: 800;
    font-size: 15px;
    color: #192340;
    letter-spacing: 0.2px;
}

.z-dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Icon buttons */
.z-topbar-icon-btn {
    width: 34px; height: 34px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center; justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 15px;
    transition: background .15s, color .15s;
    border: none;
    background: none;
    text-decoration: none;
    padding: 0;
}
.z-topbar-icon-btn:hover { background: #f4f6fb; color: var(--z-primary, #1e2ee6); text-decoration: none; }
.z-topbar-icon-btn--danger { color: #e74c3c; }
.z-topbar-icon-btn--danger:hover { background: #fdecea; color: #e74c3c; }

.z-topbar-divider {
    width: 1px; height: 22px;
    background: #E5E9EE;
    margin: 0 6px;
}

/* User chip */
.z-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: default;
}
.z-user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--z-primary, #1e2ee6);
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.4px;
}
.z-user-chip-body { line-height: 1.2; min-width: 0; }
.z-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #192340;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.z-user-meta {
    font-size: 10px;
    color: #8A94A6;
    font-weight: 600;
    margin-top: 1px;
}

@media (max-width: 768px) {
    .z-dash-topbar { margin-left: 0; padding: 10px 14px; }
    .z-user-chip-body { display: none; }
}

/* ============================================================
   16. Dashboard  (demoerp-style dark fixed sidebar)
   ============================================================ */
.z-dashboard {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ---- Sidebar (zoeone blue, fixed, 220px) ---- */
.z-dash-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 220px;
    background: var(--z-bg-blue-deep);
    color: rgba(255,255,255,0.78);
    overflow-y: auto;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.z-dash-sidebar::-webkit-scrollbar { width: 4px; }
.z-dash-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* Brand block at top */
.z-dash-user {
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    flex-direction: row;
}
.z-dash-user-avatar {
    width: 32px; height: 32px;
    background: var(--z-primary);
    border: none;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit;
    font-size: 14px; font-weight: 700; color: #fff;
    letter-spacing: 0;
    flex-shrink: 0;
}
.z-dash-user-avatar--logo {
    width: 64px; height: 64px;
    background: #fff; padding: 5px; overflow: hidden;
    border-radius: 12px;
}
.z-dash-user-avatar--logo > img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
/* Dashboard sidebar brand block — ZOEOne by default, tenant logo + name when
   the student belongs to a tenant. */
.z-dash-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.z-dash-brand-mark {
    width: 28px; height: 28px; border-radius: 7px;
    background: linear-gradient(135deg, var(--z-primary) 0%, var(--z-primary-dark, #35469b) 100%);
    flex-shrink: 0;
}
a.z-dash-brand { text-decoration: none; }
a.z-dash-brand:hover { text-decoration: none; }
a.z-dash-brand:hover .z-dash-brand-name { opacity: .9; }
.z-dash-brand-logo {
    width: 60px; height: 60px;
    background: #fff; border-radius: 12px; padding: 5px;
    object-fit: contain; display: block;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
    flex-shrink: 0;
}
.z-dash-brand-name {
    font-size: 15px; font-weight: 700; color: #fff;
    letter-spacing: 0.2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.z-dash-brand--tenant .z-dash-brand-name { font-weight: 800; }
.z-dash-user-name {
    font-size: 16px; font-weight: 900; color: #fff;
    letter-spacing: 0.3px; margin: 0;
}
.z-dash-user-badge {
    font-size: 10px; color: #fff;
    background: var(--z-primary);
    border-radius: 8px;
    padding: 1px 6px; margin: 0;
    font-weight: 700;
}

/* Nav list */
.z-dash-nav {
    display: flex; flex-direction: column;
    padding: 0; gap: 0;
}
.z-dash-nav-section {
    padding: 18px 18px 6px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.55);
}
.z-dash-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 18px;
    border-radius: 0;
    font-size: 13px; font-weight: 400;
    color: #fff;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}
.z-dash-nav-link:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
    text-decoration: none;
    border-left-color: transparent;
}
.z-dash-nav-link.is-active {
    background: rgba(var(--z-primary-rgb), 0.28);
    color: #fff;
    border-left-color: var(--z-primary-light);
    font-weight: 700;
}

/* Colored icon tile — defaults to primary blue, override via inline style per link */
.z-dash-nav-icon {
    width: 26px; height: 26px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 7px;
    flex-shrink: 0;
    opacity: 1;
    background: rgba(255,255,255,.14);
    color: #fff;
}
.z-dash-nav-icon svg { width: 14px; height: 14px; }
.z-dash-nav-link.is-active .z-dash-nav-icon,
.z-dash-nav-link:hover .z-dash-nav-icon { opacity: 1; }

.z-dash-nav-divider { height: 1px; background: rgba(255,255,255,.10); margin: 10px 0; }
.z-dash-logout-form { margin: 0; }
.z-dash-nav-link--logout { width: 100%; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; }
.z-dash-nav-link--logout:hover { background: rgba(255,255,255,.06); color: #fff; border-left-color: transparent; }
.z-dash-nav-link--logout:hover .z-dash-nav-icon { opacity: 1; color: inherit; }

/* ---- Content area (shifted right to clear the fixed sidebar) ---- */
.z-dash-content {
    min-width: 0;
    margin-left: 220px;
    padding: 32px 32px 64px;
    max-width: 1400px;
}
/* Full-bleed content wrapper — drops the 1400px cap so children can
   stretch to the full viewport width (minus the sidebar). */
.z-dash-content--fluid { max-width: none; }
.z-dash-heading {
    display: flex; align-items: baseline; justify-content: space-between;
    flex-wrap: wrap; gap: 6px; margin: 0 0 22px;
}
.z-dash-heading h1 {
    font-family: var(--z-font-serif);
    font-size: 26px; font-weight: 500;
    letter-spacing: -0.02em; margin: 0;
}
.z-dash-heading-sub { font-size: 13px; color: var(--z-text-muted); }
.z-dash-heading--sub {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--z-border);
}

/* ---- Score hero card ---- */
.z-score-hero {
    background: linear-gradient(140deg, var(--z-bg-blue-deep) 0%, var(--z-primary) 55%, var(--z-primary-light) 100%);
    border-radius: var(--z-radius-lg);
    padding: 32px 36px;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 36px;
    position: relative; overflow: hidden;
}
.z-score-hero::before {
    content: "";
    position: absolute; top: -60px; right: -60px;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,0.06); pointer-events: none;
}
.z-score-hero::after {
    content: "";
    position: absolute; bottom: -40px; left: 40%;
    width: 160px; height: 160px; border-radius: 50%;
    background: rgba(255,255,255,0.04); pointer-events: none;
}
.z-score-ring-wrap { flex-shrink: 0; position: relative; width: 144px; height: 144px; }
.z-score-ring { width: 144px; height: 144px; transform: rotate(-90deg); }
.z-score-ring-bg { fill: none; stroke: rgba(255,255,255,0.18); stroke-width: 10; }
.z-score-ring-fill {
    fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round;
}
.z-score-ring-label {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.z-score-ring-num {
    font-family: var(--z-font-serif);
    font-size: 40px; font-weight: 600;
    color: #fff; line-height: 1; letter-spacing: -0.03em;
}
.z-score-ring-denom { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 2px; }
.z-score-hero-body { flex: 1; min-width: 0; }
.z-score-hero-headline {
    font-family: var(--z-font-serif);
    font-size: 20px; font-weight: 500; color: #fff;
    margin: 0 0 8px; line-height: 1.35;
}
.z-score-hero-sub { font-size: 13px; color: rgba(255,255,255,0.65); margin: 0 0 18px; }
.z-score-hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* Hero sits on a dark gradient — force white text on the meta chips and the
   ghost CTA inside it. Scoped so ghost buttons elsewhere stay dark on light. */
.z-score-hero,
.z-score-hero .z-score-hero-meta span { color: #fff; }
.z-score-hero .z-btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.z-score-hero .z-btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.14); }
.z-score-hero-tag {
    font-size: 11px; font-weight: 600;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.9);
    border-radius: var(--z-radius-pill);
    padding: 3px 12px; letter-spacing: 0.02em;
}

/* ---- Cards ---- */
.z-dash-card {
    background: var(--z-bg-panel);
    border-radius: var(--z-radius-md);
    border: 1px solid var(--z-border);
    box-shadow: 0 2px 8px rgba(15,23,36,0.05);
    padding: 22px 24px;
    margin-bottom: 14px;
    transition: box-shadow .22s var(--z-ease), transform .22s var(--z-ease);
}
.z-dash-card:hover {
    box-shadow: 0 10px 32px rgba(15,23,36,0.1);
    transform: translateY(-2px);
}
.z-dash-card-header { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.z-dash-card-icon {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.z-dash-card-icon svg { width: 17px; height: 17px; }
.z-dash-card-title { font-size: 14px; font-weight: 700; color: var(--z-text); margin: 0; }

/* color-coded top borders + icon tints */
.z-dash-card--strengths { border-top: 3px solid #10b981; }
.z-dash-card--strengths .z-dash-card-icon { background: #d1fae5; color: #065f46; }
.z-dash-card--growth    { border-top: 3px solid #f59e0b; }
.z-dash-card--growth    .z-dash-card-icon { background: #fef3c7; color: #92400e; }
.z-dash-card--paths     { border-top: 3px solid var(--z-primary); }
.z-dash-card--paths     .z-dash-card-icon { background: var(--z-primary-soft); color: var(--z-primary); }
.z-dash-card--steps     { border-top: 3px solid #8b5cf6; }
.z-dash-card--steps     .z-dash-card-icon { background: #ede9fe; color: #5b21b6; }
.z-dash-card--enrolled  { border-top: 3px solid var(--z-primary); }
.z-dash-card--enrolled  .z-dash-card-icon { background: var(--z-primary-softer); color: var(--z-primary); }

/* ---- List ---- */
.z-dash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.z-dash-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.6; color: var(--z-text); }
.z-dash-list li::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; opacity: 0.4;
    flex-shrink: 0; margin-top: 7px;
}

/* ---- Empty state ---- */
.z-dash-empty { text-align: center; padding: 60px 20px; }
.z-dash-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; display: block; opacity: 0.22; }
.z-dash-empty h3 { font-size: 17px; font-weight: 600; color: var(--z-text); margin: 0 0 8px; }
.z-dash-empty p { font-size: 14px; color: var(--z-text-muted); line-height: 1.55; margin: 0 auto 22px; max-width: 420px; }
.z-dash-empty-actions { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Full-viewport empty-state: card sits with slim 16px gutters inside
   the content area (just inside the sidebar) but still spans the full
   available width. Inner block stays horizontally + vertically centered.
   The subtle dot-grid background + corner accent give it a distinct
   feel without becoming busy. Used by views like /dashboard/lesson-plans
   when there's nothing to show. */
.z-dash-card--empty-fill {
    position: relative;
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    margin: -8px -16px 0;
    width: calc(100% + 32px);
    max-width: none;
    border-radius: 18px;
    border: 1px solid #e8ebf5;
    background:
        radial-gradient(circle at 20px 20px, rgba(15, 23, 36, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(180deg, #fdfdff 0%, #f6f8ff 100%);
    box-shadow: 0 2px 10px rgba(15, 23, 36, 0.04);
    overflow: hidden;
}
.z-dash-card--empty-fill::before,
.z-dash-card--empty-fill::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.55;
}
.z-dash-card--empty-fill::before {
    top: -80px; left: -80px;
    background: rgba(var(--z-primary-rgb, 65, 80, 224), 0.18);
}
.z-dash-card--empty-fill::after {
    bottom: -100px; right: -80px;
    background: rgba(var(--z-primary-rgb, 65, 80, 224), 0.12);
}
.z-dash-card--empty-fill > * {
    position: relative;
    z-index: 1;
}
.z-dash-empty--large { padding: 48px 24px; max-width: 560px; }
.z-dash-empty--large .z-dash-empty-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
    opacity: 1;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    color: var(--z-primary, #4150e0);
    stroke-width: 1.6;
    box-shadow: 0 4px 16px rgba(var(--z-primary-rgb, 65, 80, 224), 0.14);
    border: 1px solid rgba(var(--z-primary-rgb, 65, 80, 224), 0.14);
}
.z-dash-empty--large h3 { font-size: 22px; margin-bottom: 10px; letter-spacing: -0.01em; }
.z-dash-empty--large p { font-size: 15px; max-width: 460px; margin-bottom: 26px; line-height: 1.6; }

@media (max-width: 640px) {
    .z-dash-card--empty-fill {
        min-height: calc(100vh - 140px);
        padding: 28px 16px;
        margin-left: -8px;
        margin-right: -8px;
        width: calc(100% + 16px);
        border-radius: 14px;
    }
    .z-dash-empty--large { padding: 32px 16px; }
    .z-dash-empty--large h3 { font-size: 19px; }
}

/* ---- Lesson timeline ---- */
.z-lesson-timeline { display: flex; flex-direction: column; }
.z-lesson-step { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 20px; }
.z-lesson-step:last-child { padding-bottom: 0; }
.z-lesson-step-track { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.z-lesson-step-num {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--z-primary), var(--z-primary-light));
    color: #fff; font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(30, 42, 120,0.28); flex-shrink: 0;
}
.z-lesson-step-line {
    width: 2px; flex: 1; min-height: 16px;
    background: var(--z-border); margin: 5px 0;
}
.z-lesson-step:last-child .z-lesson-step-line { display: none; }
.z-lesson-step-body { padding-top: 6px; min-width: 0; }
.z-lesson-step-title { font-size: 15px; font-weight: 600; color: var(--z-text); margin: 0 0 4px; line-height: 1.4; }
.z-lesson-step-desc { font-size: 13px; color: var(--z-text-muted); margin: 0; line-height: 1.5; }

/* ---- Subject cards ---- */
.z-subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.z-subject-card {
    background: var(--z-primary-softer);
    border: 1px solid var(--z-primary-soft);
    border-radius: var(--z-radius-md);
    padding: 22px 14px 18px; text-align: center;
    transition: transform .18s var(--z-ease), box-shadow .18s var(--z-ease), background .18s;
}
.z-subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(30, 42, 120,0.14);
    background: var(--z-primary-soft);
}
.z-subject-card-icon { font-size: 28px; display: block; margin-bottom: 10px; line-height: 1; }
.z-subject-card-name { font-size: 13px; font-weight: 600; color: var(--z-primary); line-height: 1.35; }

/* ---- Profile ---- */
.z-profile-hero { display: flex; align-items: center; gap: 20px; }
.z-profile-hero-text { flex: 1; min-width: 0; }
.z-profile-edit-btn { flex-shrink: 0; }
.z-profile-avatar-lg {
    width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--z-primary), var(--z-primary-light));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--z-font-serif);
    font-size: 28px; font-weight: 600; color: #fff;
    box-shadow: 0 8px 24px rgba(30, 42, 120,0.28);
}
.z-profile-hero-name {
    font-family: var(--z-font-serif);
    font-size: 22px; font-weight: 500;
    color: var(--z-text); margin: 0 0 4px; letter-spacing: -0.015em;
}
.z-profile-hero-email { font-size: 14px; color: var(--z-text-muted); margin: 0; }
.z-profile-divider { height: 1px; background: var(--z-border); margin: 22px 0; }
.z-profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.z-profile-field { display: flex; flex-direction: column; gap: 5px; }
.z-profile-field-label {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--z-text-muted);
}
.z-profile-field-value { font-size: 15px; font-weight: 500; color: var(--z-text); }

/* Profile card — matches the generous feel of the My Subjects cards:
   same accent top-border, same card padding/margin rhythm, roomier hero
   and fields grid. No forced min-height — the content decides. */
.z-dash-card--profile {
    padding: 48px 56px 72px;
    min-height: calc(100vh - 140px);
    border-top: 3px solid var(--z-primary);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
}
.z-dash-card--profile .z-profile-hero { gap: 16px; }
.z-dash-card--profile .z-profile-hero-text { margin-left: 0; }
.z-dash-card--profile .z-profile-avatar-lg {
    width: 88px; height: 88px; font-size: 32px;
}
.z-dash-card--profile .z-profile-hero-name { font-size: 24px; margin-bottom: 4px; }
.z-dash-card--profile .z-profile-hero-email { font-size: 14px; }
.z-dash-card--profile .z-profile-divider { margin: 18px 0; }
.z-dash-card--profile .z-profile-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 48px;
    max-width: 900px;
}
.z-dash-card--profile .z-profile-field { gap: 6px; }
.z-dash-card--profile .z-profile-field-value { font-size: 16px; }
@media (max-width: 720px) {
    .z-dash-card--profile { padding: 20px 18px; min-height: 0; }
    .z-dash-card--profile .z-profile-avatar-lg { width: 64px; height: 64px; font-size: 24px; }
    .z-dash-card--profile .z-profile-hero-name { font-size: 20px; }
    .z-dash-card--profile .z-profile-hero { gap: 14px; }
    .z-dash-card--profile .z-profile-divider { margin: 22px 0; }
    .z-dash-card--profile .z-profile-fields { gap: 20px 24px; }
}

/* Token usage card (profile page) */
.z-token-usage-card { margin-top: 20px; }
.z-token-stats {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 0;
    margin-bottom: 22px;
}
.z-token-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    text-align: center;
}
.z-token-stat-divider {
    width: 1px;
    height: 48px;
    background: var(--z-border);
    flex-shrink: 0;
}
.z-token-stat-num {
    font-family: var(--z-font-serif);
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--z-text);
}
.z-token-stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--z-text-muted);
}
.z-token-stat--remaining .z-token-stat-num { color: var(--z-primary); }
.z-token-quota { margin-top: 4px; }
.z-token-quota-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--z-text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}
.z-token-quota-right { color: var(--z-primary); font-weight: 600; }
.z-token-quota-bar {
    height: 8px;
    background: var(--z-border-strong, #e2e6ea);
    border-radius: var(--z-radius-pill);
    overflow: hidden;
}
.z-token-quota-fill {
    height: 100%;
    width: var(--used-pct, 0%);
    background: var(--z-primary);
    border-radius: var(--z-radius-pill);
    transition: width .5s ease;
}
.z-token-quota-fill.is-warning  { background: #f59e0b; }
.z-token-quota-fill.is-critical { background: var(--z-danger, #ef4444); }
@media (max-width: 600px) {
    .z-token-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .z-token-stat-divider { display: none; }
}

/* ====================================================
   Subjects page
   ==================================================== */

/* Hero */
.z-subj-hero {
    background: linear-gradient(140deg, var(--z-bg-blue-deep) 0%, var(--z-primary) 55%, var(--z-primary-light) 100%);
    border-radius: var(--z-radius-lg);
    padding: 32px 36px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
    overflow: hidden;
}
.z-subj-hero::before {
    content: "";
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    top: -80px; right: -60px;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.z-subj-hero-left { flex: 1; min-width: 0; }
.z-subj-hero-eyebrow {
    display: block;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin: 0 0 10px;
}
.z-subj-hero-title {
    font-family: var(--z-font-serif);
    font-size: 28px; font-weight: 500;
    color: #fff; line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}
.z-subj-hero-sub {
    font-size: 13px; color: rgba(255,255,255,0.6);
    margin: 0 0 16px; line-height: 1.55;
    max-width: 380px;
}
.z-subj-hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.z-subj-hero-tag {
    font-size: 11px; font-weight: 600;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.92);
    border-radius: var(--z-radius-pill);
    padding: 3px 11px;
}

/* Hero ring */
.z-subj-hero-ring-wrap {
    flex-shrink: 0;
    position: relative;
    width: 88px; height: 88px;
}
.z-subj-hero-ring {
    display: block;
    width: 88px; height: 88px;
    transform: rotate(-90deg);
}
.z-subj-ring-bg   { fill: none; stroke: rgba(255,255,255,.2);  stroke-width: 8; }
.z-subj-ring-fill { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; }
.z-subj-hero-ring-label {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.z-subj-hero-ring-num {
    font-family: var(--z-font-serif);
    font-size: 22px; font-weight: 600;
    color: #fff; line-height: 1;
}
.z-subj-hero-ring-sub {
    font-size: 10px; color: rgba(255,255,255,0.55);
    margin-top: 2px;
}

/* Stats strip */
.z-subj-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.z-subj-stat {
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    padding: 20px 14px 16px;
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(15,23,36,0.04);
    transition: transform .18s, box-shadow .18s;
}
.z-subj-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15,23,36,0.09);
}
.z-subj-stat-icon {
    width: 42px; height: 42px;
    border-radius: 11px;
    display: grid; place-items: center;
    margin: 0 auto 10px;
    flex-shrink: 0;
    overflow: hidden;
}
.z-subj-stat-icon svg { width: 20px; height: 20px; display: block; }
.z-subj-stat--score     .z-subj-stat-icon { background: rgba(30, 42, 120,0.09); color: var(--z-primary); }
.z-subj-stat--paths     .z-subj-stat-icon { background: rgba(30, 42, 120,0.09); color: var(--z-primary); }
.z-subj-stat--strengths .z-subj-stat-icon { background: #d1fae5; color: #059669; }
.z-subj-stat--growth    .z-subj-stat-icon { background: #fef3c7; color: #d97706; }
.z-subj-stat-num {
    font-family: var(--z-font-serif);
    font-size: 30px; font-weight: 600;
    line-height: 1; letter-spacing: -0.03em;
    color: var(--z-primary);
}
.z-subj-stat-num--blue  { color: var(--z-primary); }
.z-subj-stat-num--green { color: #10b981; }
.z-subj-stat-num--amber { color: #f59e0b; }
.z-subj-stat-label {
    font-size: 11px; font-weight: 600;
    color: var(--z-text-muted); letter-spacing: 0.02em;
}

/* Priority badge & readiness bar (used inside .z-lesson-step-body) */
.z-subj-priority-badge {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
    background: rgba(30, 42, 120,0.08);
    color: var(--z-primary);
    border-radius: var(--z-radius-pill);
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: middle;
    white-space: nowrap;
}
.z-subj-bar-wrap {
    height: 5px;
    background: rgba(15,23,36,0.08);
    border-radius: var(--z-radius-pill);
    overflow: hidden;
    margin-top: 8px;
}
.z-subj-bar-fill {
    height: 100%;
    width: var(--bar-width, 60%);
    background: linear-gradient(90deg, var(--z-primary), var(--z-primary-light));
    border-radius: var(--z-radius-pill);
}

/* Mobile */
@media (max-width: 768px) {
    .z-dashboard          { display: block; padding: 0; }
    .z-dash-sidebar       { position: static; width: 100%; }
    .z-dash-nav           { flex-direction: row; flex-wrap: wrap; padding: 10px 8px 12px; }
    .z-dash-user          { padding: 20px 16px; }
    .z-dash-content       { margin-left: 0; padding: 16px 14px 48px; max-width: none; }
    .z-score-hero         { flex-direction: column; text-align: center; padding: 28px 20px; gap: 24px; }
    .z-score-hero-tags    { justify-content: center; }
    .z-profile-fields     { grid-template-columns: 1fr; }
    .z-profile-hero       { flex-wrap: wrap; }
    .z-profile-edit-btn   { margin-left: auto; }
    .z-subject-grid       { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .z-subj-hero          { flex-direction: column; padding: 24px 20px; }
    .z-subj-hero-ring-wrap { display: none; }
    .z-subj-stats         { grid-template-columns: repeat(2, 1fr); }
    .z-lms-lesson-layout  { flex-direction: column; }
    .z-lms-lesson-sidebar { display: none; }
    .z-lms-hero           { flex-direction: column; gap: 20px; }
    .z-enrolled-grid      { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .z-cert               { padding: 32px 20px; }
    .z-cert-meta          { flex-direction: column; gap: 8px; }
    .z-cert-meta-sep      { display: none; }
}


/* ============================================================
   LMS — Learning Management System
   ============================================================ */

/* ── Shared enroll / level utilities ── */
.z-lesson-step-title--row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.z-btn-success-soft {
    background: rgba(22,163,74,.1); color: var(--z-success);
    border-color: rgba(22,163,74,.25);
}
.z-btn-success-soft:hover { background: rgba(22,163,74,.18); text-decoration: none; }

.z-lms-level-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 4px 12px; border-radius: var(--z-radius-pill);
}
.z-lms-level-beginner     { background: rgba(30, 42, 120,.1);   color: var(--z-primary); }
.z-lms-level-intermediate { background: rgba(246,137,60,.14);  color: #b84e0a; }
.z-lms-level-advanced     { background: rgba(220,38,38,.1);   color: var(--z-danger); }

/* ── Back link ── */
.z-lms-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: var(--z-text-muted);
    margin-bottom: 22px; padding: 6px 12px 6px 8px;
    border-radius: var(--z-radius-pill);
    transition: background .15s, color .15s;
}
.z-lms-back:hover { background: var(--z-bg-panel); color: var(--z-text); text-decoration: none; }

/* ── Enrolled courses grid ── */
.z-enrolled-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    padding: 4px 0 8px;
}
.z-enrolled-card {
    display: block;
    background: var(--z-bg-panel); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md); overflow: hidden;
    text-decoration: none; color: var(--z-text);
    box-shadow: 0 1px 4px rgba(15,23,36,.05);
    transition: box-shadow .2s var(--z-ease), transform .2s var(--z-ease), border-color .2s;
}
.z-enrolled-card:hover {
    box-shadow: 0 8px 28px rgba(15,23,36,.12);
    transform: translateY(-3px);
    border-color: var(--z-primary-light);
    text-decoration: none;
}
/* Gradient accent strip at top */
.z-enrolled-card::before {
    content: ""; display: block; height: 3px;
    background: linear-gradient(90deg, var(--z-primary) 0%, var(--z-primary-light) 100%);
}
.z-enrolled-card-inner { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.z-enrolled-card-row {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.z-enrolled-name {
    font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--z-text);
    flex: 1; min-width: 0;
}
.z-enrolled-pct-label {
    font-size: 13px; font-weight: 800; color: var(--z-primary);
    flex-shrink: 0; line-height: 1;
}
/* Progress bar */
.z-enrolled-bar-wrap {
    height: 6px; border-radius: 3px; background: var(--z-border); overflow: hidden;
}
.z-enrolled-bar-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--z-primary), var(--z-primary-light));
    transition: width .6s var(--z-ease-out);
    min-width: 2px;
}
.z-enrolled-card-foot {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.z-enrolled-meta { font-size: 11px; color: var(--z-text-muted); }
.z-enrolled-cert-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 700; color: var(--z-success);
    background: rgba(22,163,74,.1); border-radius: var(--z-radius-pill);
    padding: 2px 8px;
}

/* ── LMS Hero (Roadmap page) ── */
.z-lms-hero {
    background: linear-gradient(140deg, var(--z-bg-blue-deep) 0%, var(--z-primary) 55%, #6a76ff 100%);
    border-radius: var(--z-radius-xl);
    padding: 40px 44px;
    display: flex; align-items: center; gap: 36px;
    margin-bottom: 24px;
    position: relative; overflow: hidden;
}
/* Decorative blobs */
.z-lms-hero::before {
    content: ""; position: absolute;
    width: 320px; height: 320px; border-radius: 50%;
    top: -100px; right: -80px;
    background: rgba(255,255,255,.06); pointer-events: none;
}
.z-lms-hero::after {
    content: ""; position: absolute;
    width: 160px; height: 160px; border-radius: 50%;
    bottom: -60px; left: 200px;
    background: rgba(255,255,255,.04); pointer-events: none;
}
.z-lms-hero-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.z-lms-hero-meta {
    display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.z-lms-hero-hours {
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,.65);
    background: rgba(255,255,255,.12); border-radius: var(--z-radius-pill);
    padding: 3px 10px;
}
/* Level badge — white variant inside hero */
.z-lms-hero .z-lms-level-badge {
    background: rgba(255,255,255,.18); color: rgba(255,255,255,.95);
    border: 1px solid rgba(255,255,255,.28);
}
.z-lms-hero-title {
    font-family: var(--z-font-serif);
    font-size: 32px; font-weight: 500; letter-spacing: -.025em;
    color: #fff; margin: 0 0 12px; line-height: 1.15;
}
.z-lms-hero-desc {
    font-size: 14px; color: rgba(255,255,255,.7);
    margin: 0 0 26px; line-height: 1.65; max-width: 520px;
}
/* Mini stats row inside hero */
.z-lms-hero-stats {
    display: flex; gap: 0; flex-wrap: wrap;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--z-radius-md); overflow: hidden; align-self: flex-start;
}
.z-lms-stat {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 14px 24px; border-right: 1px solid rgba(255,255,255,.15);
}
.z-lms-stat:last-child { border-right: none; }
.z-lms-stat-num   { font-size: 24px; font-weight: 800; color: #fff; line-height: 1; }
.z-lms-stat-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.6); letter-spacing: .04em; text-transform: uppercase; }

/* Ring inside hero */
.z-lms-hero-ring-wrap {
    position: relative; width: 120px; height: 120px; flex-shrink: 0; z-index: 1;
}
.z-lms-hero-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.z-lms-ring-label {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.z-lms-ring-num {
    font-family: var(--z-font-serif);
    font-size: 28px; font-weight: 600; color: #fff; line-height: 1;
}
.z-lms-ring-sub { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }
.z-lms-ring-animated { transition: stroke-dashoffset .9s var(--z-ease-out); }

/* ── Progress bar strip ── */
.z-lms-progress-bar-wrap {
    display: flex; align-items: center; gap: 16px;
    background: var(--z-bg-panel); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md); padding: 14px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(15,23,36,.04);
}
.z-lms-progress-bar {
    flex: 1; height: 10px; border-radius: 5px;
    background: var(--z-border); overflow: hidden;
}
.z-lms-progress-fill {
    height: 100%; width: var(--lms-pct, 0%);
    background: linear-gradient(90deg, var(--z-primary) 0%, #6a76ff 50%, var(--z-shape-cyan) 100%);
    border-radius: 5px;
    transition: width .9s var(--z-ease-out);
}
.z-lms-progress-label { font-size: 13px; font-weight: 600; color: var(--z-text-muted); white-space: nowrap; }

/* ── Certificate banner ── */
.z-lms-cert-banner {
    background: linear-gradient(135deg, rgba(22,163,74,.1) 0%, rgba(22,163,74,.04) 100%);
    border: 1px solid rgba(22,163,74,.3);
    border-radius: var(--z-radius-md); padding: 18px 24px;
    display: flex; align-items: center; gap: 18px;
    margin-bottom: 28px; color: var(--z-success);
    box-shadow: 0 4px 16px rgba(22,163,74,.08);
}
.z-lms-cert-banner strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.z-lms-cert-banner span   { font-size: 13px; opacity: .8; }
.z-lms-cert-banner > div  { flex: 1; }

/* ── Certificate locked ── */
.z-lms-cert-locked {
    display: flex; align-items: center; gap: 24px;
    background: var(--z-bg-panel); border: 2px dashed var(--z-border);
    border-radius: var(--z-radius-lg); padding: 28px 32px; margin-top: 28px;
    color: var(--z-text-muted);
}
.z-lms-cert-locked-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: var(--z-primary-softer); border: 1px solid var(--z-primary-soft);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--z-primary);
}
.z-lms-cert-locked strong { display: block; font-size: 16px; font-weight: 700; color: var(--z-text); margin-bottom: 5px; }
.z-lms-cert-locked p      { margin: 0; font-size: 14px; line-height: 1.55; }

/* ── Roadmap chapters ── */
.z-lms-roadmap { display: flex; flex-direction: column; gap: 14px; }

/* Chapter color palette — cycles through accent colours */
.z-lms-chapter { --ch-color: var(--z-primary); --ch-bg: var(--z-primary-softer); }
.z-lms-chapter:nth-child(2) { --ch-color: #0891b2; --ch-bg: rgba(8,145,178,.1); }
.z-lms-chapter:nth-child(3) { --ch-color: #7c3aed; --ch-bg: rgba(124,58,237,.1); }
.z-lms-chapter:nth-child(4) { --ch-color: #d97706; --ch-bg: rgba(217,119,6,.1);  }
.z-lms-chapter:nth-child(5) { --ch-color: #059669; --ch-bg: rgba(5,150,105,.1);  }

.z-lms-chapter {
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-left: 4px solid var(--ch-color);
    border-radius: var(--z-radius-md);
    overflow: hidden;
    transition: border-color .2s var(--z-ease), box-shadow .2s var(--z-ease);
}
.z-lms-chapter.is-done   { border-left-color: var(--z-success); }
.z-lms-chapter.is-open   { box-shadow: 0 8px 32px rgba(15,23,36,.1); }

.z-lms-chapter-header {
    display: flex; align-items: center; gap: 18px;
    padding: 20px 24px; cursor: pointer; width: 100%;
    background: none; border: none; text-align: left;
    transition: background .15s var(--z-ease);
}
.z-lms-chapter-header:hover { background: rgba(15,23,36,.02); }

.z-lms-chapter-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    background: var(--ch-bg); color: var(--ch-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.z-lms-chapter.is-done .z-lms-chapter-icon {
    background: rgba(5,150,105,.12); color: var(--z-success);
}

.z-lms-chapter-info { flex: 1; min-width: 0; }
.z-lms-chapter-title {
    display: block; font-size: 15px; font-weight: 700;
    color: var(--z-text); margin-bottom: 5px;
}
.z-lms-chapter-meta { font-size: 12px; color: var(--z-text-muted); display: flex; align-items: center; gap: 10px; }

/* Mini progress bar in chapter header */
.z-lms-chapter-prog-bar {
    display: flex; align-items: center; gap: 8px; margin-top: 6px;
}
.z-lms-chapter-prog-track {
    flex: 1; height: 4px; border-radius: 2px; background: var(--z-border); overflow: hidden;
}
.z-lms-chapter-prog-fill {
    height: 100%; border-radius: 2px; background: var(--ch-color);
    transition: width .6s var(--z-ease-out);
}
.z-lms-chapter.is-done .z-lms-chapter-prog-fill { background: var(--z-success); }
.z-lms-chapter-prog-pct {
    font-size: 11px; font-weight: 700; color: var(--ch-color); white-space: nowrap;
}
.z-lms-chapter.is-done .z-lms-chapter-prog-pct { color: var(--z-success); }

.z-lms-chapter-chevron {
    color: var(--z-text-muted); transition: transform .25s var(--z-ease);
    background: var(--z-bg); border: 1px solid var(--z-border);
    border-radius: 8px; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.z-lms-chapter.is-open .z-lms-chapter-chevron { transform: rotate(180deg); background: var(--ch-bg); border-color: var(--ch-color); color: var(--ch-color); }

.z-lms-chapter-body { padding: 0 24px 24px; border-top: 1px solid var(--z-border); }
.z-lms-chapter-desc { font-size: 14px; color: var(--z-text-muted); margin: 16px 0 0; line-height: 1.6; }

/* ── Section labels ── */
.z-lms-section-label {
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: var(--z-text-dim); margin: 20px 0 10px;
    display: flex; align-items: center; gap: 8px;
}
.z-lms-section-label::after {
    content: ""; flex: 1; height: 1px; background: var(--z-border);
}

/* ── Lessons list ── */
.z-lms-lessons { display: flex; flex-direction: column; gap: 3px; }
.z-lms-lesson-row {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 14px; border-radius: var(--z-radius-sm);
    text-decoration: none; color: var(--z-text);
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, transform .15s;
}
.z-lms-lesson-row:hover {
    background: var(--z-primary-softer); border-color: var(--z-primary-soft);
    transform: translateX(3px); text-decoration: none;
}
.z-lms-lesson-row.is-done { color: var(--z-text-muted); }
.z-lms-lesson-row.is-done:hover { background: rgba(5,150,105,.06); border-color: rgba(5,150,105,.2); }
.z-lms-lesson-check {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid var(--z-border-strong);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s;
}
.z-lms-lesson-row.is-done .z-lms-lesson-check {
    background: var(--z-success); border-color: var(--z-success); color: #fff;
}
.z-lms-lesson-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--z-border-strong); }
.z-lms-lesson-title { flex: 1; font-size: 14px; font-weight: 500; }
.z-lms-lesson-row.is-done .z-lms-lesson-title { text-decoration: line-through; opacity: .7; }
.z-lms-lesson-dur {
    font-size: 11px; font-weight: 600; color: var(--z-text-dim);
    background: var(--z-bg); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-pill); padding: 2px 8px; white-space: nowrap;
}

/* ── Quiz card (inside chapter) ── */
.z-lms-quiz-row { margin-top: 4px; }
.z-lms-quiz-card {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: linear-gradient(135deg, var(--z-primary-softer) 0%, var(--z-bg) 100%);
    border: 1px solid var(--z-primary-soft);
    border-radius: var(--z-radius-md); padding: 14px 18px;
}
.z-lms-quiz-info { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--z-primary); font-weight: 500; }
.z-lms-quiz-score {
    font-weight: 700; padding: 3px 12px; border-radius: var(--z-radius-pill); font-size: 12px;
}
.z-lms-quiz-score.is-pass { background: rgba(5,150,105,.12); color: var(--z-success); }
.z-lms-quiz-score.is-fail { background: rgba(220,38,38,.1);  color: var(--z-danger); }

/* ── References ── */
.z-lms-refs-section { margin-top: 4px; }
.z-lms-refs-list { display: flex; flex-direction: column; gap: 8px; }
.z-lms-ref-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; border-radius: var(--z-radius-md);
    border: 1px solid var(--z-border);
    background: var(--z-bg);
    text-decoration: none; color: var(--z-text);
    transition: all .18s var(--z-ease);
}
.z-lms-ref-item:hover {
    border-color: var(--z-primary-light);
    background: var(--z-primary-softer);
    box-shadow: 0 4px 14px rgba(30, 42, 120,.08);
    transform: translateX(4px);
    text-decoration: none;
}
.z-lms-ref-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--z-primary-softer); color: var(--z-primary);
}
.z-lms-ref-icon svg { width: 17px; height: 17px; }
.z-lms-ref-body { flex: 1; min-width: 0; }
.z-lms-ref-title {
    display: block; font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.z-lms-ref-desc  { display: block; font-size: 12px; color: var(--z-text-muted); margin-top: 1px; }
.z-lms-ref-type-badge {
    font-size: 11px; font-weight: 700; letter-spacing: .03em;
    color: var(--z-primary); background: var(--z-primary-softer);
    border: 1px solid var(--z-primary-soft);
    border-radius: var(--z-radius-pill); padding: 3px 10px; white-space: nowrap;
}

/* ── Breadcrumb ── */
.z-lms-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--z-text-muted);
    margin-bottom: 26px; flex-wrap: wrap;
}
.z-lms-breadcrumb a { color: var(--z-text-muted); transition: color .12s; }
.z-lms-breadcrumb a:hover { color: var(--z-primary); text-decoration: none; }
.z-lms-breadcrumb span { color: var(--z-border-strong); }
.z-lms-breadcrumb span:last-child { color: var(--z-text); font-weight: 600; }

/* ── Lesson page layout ── */
.z-lms-lesson-layout { display: flex; gap: 28px; align-items: flex-start; }
.z-lms-lesson-main   { flex: 1; min-width: 0; }

.z-lms-lesson-card {
    background: var(--z-bg-panel); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-xl); padding: 48px 52px;
    margin-bottom: 22px;
    box-shadow: 0 4px 24px rgba(15,23,36,.06);
}
.z-lms-lesson-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; margin-bottom: 32px;
    padding-bottom: 24px; border-bottom: 1px solid var(--z-border);
}
.z-lms-lesson-title {
    font-family: var(--z-font-serif);
    font-size: 28px; font-weight: 500; letter-spacing: -.02em;
    color: var(--z-text); margin: 0; line-height: 1.2;
}
.z-lms-lesson-dur-badge {
    font-size: 12px; font-weight: 700; color: var(--z-text-muted);
    background: var(--z-bg); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-pill); padding: 5px 14px; white-space: nowrap; flex-shrink: 0;
}
.z-lms-lesson-content {
    font-size: 16px; line-height: 1.8; color: var(--z-text);
    font-family: var(--z-font-sans);
}
.z-lms-lesson-content p { margin: 0 0 20px; }
.z-lms-lesson-content p:last-child { margin-bottom: 0; }

.z-lms-lesson-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    background: var(--z-bg-panel); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md); padding: 18px 24px;
    box-shadow: 0 2px 8px rgba(15,23,36,.04);
}
.z-lms-lesson-nav { display: flex; gap: 10px; }
.z-lms-complete-btn { min-width: 190px; }
.z-lms-completed-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700; color: var(--z-success);
    padding: 10px 20px; border-radius: var(--z-radius-pill);
    background: rgba(5,150,105,.1); border: 1px solid rgba(5,150,105,.25);
}

/* ── Lesson sidebar ── */
.z-lms-lesson-sidebar { width: 280px; flex-shrink: 0; position: sticky; top: 24px; }
.z-lms-sidebar-card {
    background: var(--z-bg-panel); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg); overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(15,23,36,.05);
}
.z-lms-sidebar-chapter {
    padding: 14px 18px; font-size: 11px; font-weight: 800;
    letter-spacing: .06em; text-transform: uppercase; color: var(--z-primary);
    border-bottom: 1px solid var(--z-border);
    background: var(--z-primary-softer);
}
.z-lms-sidebar-lessons { display: flex; flex-direction: column; }
.z-lms-sidebar-lesson {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 18px; font-size: 13px; color: var(--z-text-muted);
    text-decoration: none; border-bottom: 1px solid var(--z-border);
    transition: background .12s, color .12s;
}
.z-lms-sidebar-lesson:last-child { border-bottom: none; }
.z-lms-sidebar-lesson:hover { background: var(--z-primary-softer); color: var(--z-primary); text-decoration: none; }
.z-lms-sidebar-lesson.is-current {
    color: var(--z-primary); font-weight: 700;
    background: var(--z-primary-softer);
    border-left: 3px solid var(--z-primary);
}
.z-lms-sidebar-lesson.is-done { color: var(--z-text-dim); }
.z-lms-sidebar-check {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid var(--z-border-strong);
    display: flex; align-items: center; justify-content: center;
}
.z-lms-sidebar-lesson.is-done .z-lms-sidebar-check {
    background: var(--z-success); border-color: var(--z-success); color: #fff;
}
.z-lms-sidebar-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .4; }
.z-lms-sidebar-quiz {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 18px; font-size: 13px; font-weight: 700; color: var(--z-primary);
    text-decoration: none;
    background: linear-gradient(90deg, var(--z-primary-softer), var(--z-bg));
    border-top: 1px solid var(--z-border);
    transition: background .12s;
}
.z-lms-sidebar-quiz:hover { background: var(--z-primary-soft); text-decoration: none; }
.z-lms-sidebar-back {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--z-text-muted); text-decoration: none;
    padding: 10px 14px; border: 1px solid var(--z-border); border-radius: var(--z-radius-md);
    background: var(--z-bg-panel);
    transition: all .12s;
}
.z-lms-sidebar-back:hover { color: var(--z-primary); border-color: var(--z-primary-light); background: var(--z-primary-softer); text-decoration: none; }

/* ── Quiz page ── */
.z-lms-quiz-page { max-width: 780px; }
.z-lms-quiz-header { margin-bottom: 32px; }
.z-lms-quiz-heading {
    display: flex; align-items: center; gap: 14px;
    font-size: 24px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.02em;
}
.z-lms-quiz-heading svg { color: var(--z-primary); flex-shrink: 0; }
.z-lms-quiz-sub  { font-size: 14px; color: var(--z-text-muted); margin: 0; line-height: 1.55; }
.z-lms-quiz-prev {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 12px; font-size: 13px; color: var(--z-text-muted);
    background: var(--z-bg-panel); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-pill); padding: 6px 14px;
}

.z-lms-quiz-form  { display: flex; flex-direction: column; gap: 18px; }
.z-lms-q-card {
    background: var(--z-bg-panel); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg); padding: 26px 28px;
    display: flex; gap: 20px;
    box-shadow: 0 2px 10px rgba(15,23,36,.04);
    transition: box-shadow .2s;
}
.z-lms-q-card:focus-within { box-shadow: 0 4px 20px rgba(30, 42, 120,.1); border-color: var(--z-primary-light); }
.z-lms-q-num {
    font-size: 13px; font-weight: 800; color: var(--z-primary);
    background: var(--z-primary-softer); border: 1px solid var(--z-primary-soft);
    border-radius: 10px; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.z-lms-q-body { flex: 1; min-width: 0; }
.z-lms-q-text { font-size: 16px; font-weight: 600; margin: 0 0 18px; line-height: 1.5; }
.z-lms-options { display: flex; flex-direction: column; gap: 10px; }

.z-lms-option {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border-radius: var(--z-radius-md);
    border: 2px solid var(--z-border); cursor: pointer;
    transition: all .15s var(--z-ease);
    background: var(--z-bg);
}
.z-lms-option:hover { border-color: var(--z-primary-light); background: var(--z-primary-softer); }
.z-lms-option.is-correct {
    border-color: var(--z-success); background: rgba(5,150,105,.07);
    box-shadow: 0 2px 12px rgba(5,150,105,.12);
}
.z-lms-option.is-wrong {
    border-color: var(--z-danger); background: rgba(220,38,38,.05);
}
.z-lms-option-radio { display: none; }
.z-lms-option:has(input:checked) {
    border-color: var(--z-primary);
    background: var(--z-primary-softer);
    box-shadow: 0 2px 12px rgba(30, 42, 120,.12);
}
.z-lms-option-mark {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    background: var(--z-bg-panel); border: 1.5px solid var(--z-border);
    font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    color: var(--z-text-muted); transition: all .15s;
}
.z-lms-option:has(input:checked) .z-lms-option-mark {
    background: var(--z-primary); color: #fff; border-color: var(--z-primary);
    box-shadow: 0 2px 8px rgba(30, 42, 120,.3);
}
.z-lms-option.is-correct .z-lms-option-mark { background: var(--z-success); color: #fff; border-color: var(--z-success); }
.z-lms-option.is-wrong .z-lms-option-mark   { background: var(--z-danger);  color: #fff; border-color: var(--z-danger); }
.z-lms-option-text { font-size: 14px; font-weight: 500; line-height: 1.4; }

.z-lms-quiz-foot {
    display: flex; gap: 12px; padding-top: 10px;
    justify-content: flex-start; align-items: center;
}
.z-lms-submit-btn { min-width: 170px; }

/* Results panel */
.z-lms-quiz-results {
    background: var(--z-bg-panel); border: 1px solid var(--z-border);
    border-radius: var(--z-radius-xl); padding: 48px 52px;
    display: flex; gap: 48px; align-items: center; flex-wrap: wrap;
    margin-top: 28px;
    box-shadow: 0 8px 40px rgba(15,23,36,.08);
}
.z-lms-results-ring-wrap { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.z-lms-results-ring {
    width: 120px; height: 120px; transform: rotate(-90deg);
    transition: stroke-dashoffset .9s var(--z-ease-out);
}
.z-lms-results-info { flex: 1; min-width: 200px; }
.z-lms-results-info h2 { font-size: 26px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.02em; }
.z-lms-results-info p  { font-size: 15px; color: var(--z-text-muted); margin: 0 0 24px; line-height: 1.6; }
.z-lms-results-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Certificate page ── */
/* Gold palette local to the certificate, kept near the rules so other
   components aren't tempted to inherit "cert gold" as a general accent. */
.z-cert-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 28px;
    padding: 16px 0 48px;
    --z-gold-deep:  #8c6a1a;
    --z-gold:       #b8892c;
    --z-gold-light: #e6c56a;
    --z-gold-pale:  #f6ead1;
    --z-cream:      #fffdf6;
}
.z-cert {
    width: 100%; max-width: 860px;
    background:
        radial-gradient(circle at 12% 18%, rgba(230, 197, 106, .10) 0%, transparent 55%),
        radial-gradient(circle at 88% 82%, rgba(184, 137, 44, .08) 0%, transparent 55%),
        linear-gradient(180deg, var(--z-cream) 0%, #fff 60%);
    border-radius: 6px; padding: 86px 92px;
    position: relative; overflow: hidden;
    /* Layered frame built with multiple box-shadow rings — gives a true
       engraved/diploma look (thick gold → cream gap → thin gold → hairline). */
    box-shadow:
        inset 0 0 0  3px var(--z-gold-deep),
        inset 0 0 0  6px var(--z-gold-light),
        inset 0 0 0  9px var(--z-gold-deep),
        inset 0 0 0 15px var(--z-cream),
        inset 0 0 0 16px var(--z-gold),
        inset 0 0 0 22px var(--z-cream),
        inset 0 0 0 23px rgba(184, 137, 44, .55),
        0 28px 80px rgba(140, 106, 26, .18),
        0 0 0 1px rgba(140, 106, 26, .10);
}
/* Guilloche: a tiled dot pattern tucked between the outer thick rule and the
   inner cream gap. Two circular-dot layers, slightly offset, give a woven
   gold-rope impression without needing an SVG asset. */
.z-cert::before {
    content: ""; position: absolute;
    top: 10px; right: 10px; bottom: 10px; left: 10px;
    background:
        radial-gradient(circle at 2px 2px, var(--z-gold-deep) 0 1.1px, transparent 1.4px) 0 0 / 6px 6px,
        radial-gradient(circle at 5px 5px, var(--z-gold-light) 0 .9px, transparent 1.2px) 0 0 / 6px 6px;
    opacity: .55;
    pointer-events: none;
    /* Clip the pattern to a 3-px ring; the center stays blank so content shows. */
    -webkit-mask:
        linear-gradient(#000, #000) top left    / 100% 3px no-repeat,
        linear-gradient(#000, #000) bottom left / 100% 3px no-repeat,
        linear-gradient(#000, #000) top left    / 3px 100% no-repeat,
        linear-gradient(#000, #000) top right   / 3px 100% no-repeat;
    mask:
        linear-gradient(#000, #000) top left    / 100% 3px no-repeat,
        linear-gradient(#000, #000) bottom left / 100% 3px no-repeat,
        linear-gradient(#000, #000) top left    / 3px 100% no-repeat,
        linear-gradient(#000, #000) top right   / 3px 100% no-repeat;
}
/* Subtle inner glow / vignette so the border doesn't fight the content */
.z-cert::after {
    content: ""; position: absolute;
    top: 30px; right: 30px; bottom: 30px; left: 30px;
    border-radius: 2px;
    box-shadow: inset 0 0 60px rgba(140, 106, 26, .06);
    pointer-events: none;
}

/* Engraved gold corner ornaments — longer arms, filigree bead inside */
.z-cert-corner {
    position: absolute; width: 72px; height: 72px;
    border-style: solid; border-width: 0; border-color: var(--z-gold-deep);
    pointer-events: none; z-index: 1;
}
.z-cert-corner::before,
.z-cert-corner::after {
    content: ""; position: absolute; background: var(--z-gold); border-radius: 2px;
}
/* Primary arms (thick) + inner parallel arms (thin) via borders & pseudos */
.z-cert-corner--tl { top: 30px; left: 30px; border-top-width: 2.5px; border-left-width: 2.5px; border-radius: 2px 0 0 0; }
.z-cert-corner--tl::before { top: 6px; left: -2.5px; width: 2px; height: 32px; background: var(--z-gold-deep); opacity: .7; }
.z-cert-corner--tl::after  { top: -2.5px; left: 6px; width: 32px; height: 2px; background: var(--z-gold-deep); opacity: .7; }
.z-cert-corner--tr { top: 30px; right: 30px; border-top-width: 2.5px; border-right-width: 2.5px; border-radius: 0 2px 0 0; }
.z-cert-corner--tr::before { top: 6px; right: -2.5px; width: 2px; height: 32px; background: var(--z-gold-deep); opacity: .7; }
.z-cert-corner--tr::after  { top: -2.5px; right: 6px; width: 32px; height: 2px; background: var(--z-gold-deep); opacity: .7; }
.z-cert-corner--bl { bottom: 30px; left: 30px; border-bottom-width: 2.5px; border-left-width: 2.5px; border-radius: 0 0 0 2px; }
.z-cert-corner--bl::before { bottom: 6px; left: -2.5px; width: 2px; height: 32px; background: var(--z-gold-deep); opacity: .7; }
.z-cert-corner--bl::after  { bottom: -2.5px; left: 6px; width: 32px; height: 2px; background: var(--z-gold-deep); opacity: .7; }
.z-cert-corner--br { bottom: 30px; right: 30px; border-bottom-width: 2.5px; border-right-width: 2.5px; border-radius: 0 0 2px 0; }
.z-cert-corner--br::before { bottom: 6px; right: -2.5px; width: 2px; height: 32px; background: var(--z-gold-deep); opacity: .7; }
.z-cert-corner--br::after  { bottom: -2.5px; right: 6px; width: 32px; height: 2px; background: var(--z-gold-deep); opacity: .7; }

.z-cert-inner { text-align: center; position: relative; z-index: 1; }
.z-cert-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.z-cert-brand-mark {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--z-gold-light), var(--z-gold-deep)) !important;
    box-shadow: 0 2px 8px rgba(140, 106, 26, .35);
}
.z-cert-brand-name {
    font-family: var(--z-font-serif);
    font-size: 24px; font-weight: 500; letter-spacing: .02em;
    background: linear-gradient(180deg, var(--z-gold-deep), var(--z-gold));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.z-cert-presents {
    font-family: var(--z-font-serif);
    font-size: 14px; letter-spacing: .34em; text-transform: uppercase;
    color: var(--z-gold-deep); font-weight: 600;
    margin: 0 0 18px;
}
.z-cert-divider {
    width: 180px; height: 14px; margin: 0 auto 28px;
    background:
        /* center diamond */
        radial-gradient(circle at 50% 50%, var(--z-gold) 0 3px, transparent 4px),
        /* flanking rules */
        linear-gradient(90deg,
            transparent 0%,
            var(--z-gold-light) 10%,
            var(--z-gold) 42%,
            transparent 48% 52%,
            var(--z-gold) 58%,
            var(--z-gold-light) 90%,
            transparent 100%);
    background-size: 100% 100%, 100% 1px;
    background-position: center, center;
    background-repeat: no-repeat;
}
.z-cert-this-certifies {
    font-family: var(--z-font-serif);
    font-style: italic;
    font-size: 16px; color: var(--z-text-muted); margin: 0 0 14px; letter-spacing: .02em;
}
.z-cert-name {
    font-family: var(--z-font-serif);
    font-size: 62px; font-weight: 400; font-style: italic;
    letter-spacing: -.01em; color: #2a1f04; margin: 0 0 18px; line-height: 1.05;
    text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.z-cert-has {
    font-family: var(--z-font-serif);
    font-style: italic;
    font-size: 15px; color: var(--z-text-muted); margin: 0 0 14px;
}
.z-cert-course {
    font-family: var(--z-font-serif);
    font-size: 30px; font-weight: 600;
    background: linear-gradient(180deg, var(--z-gold-deep) 0%, var(--z-gold) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: .005em; margin: 0 0 40px;
}

.z-cert-meta {
    display: flex; align-items: stretch; justify-content: center;
    gap: 0; margin-bottom: 36px;
    background: rgba(246, 234, 209, .35);
    border: 1px solid rgba(184, 137, 44, .35);
    border-radius: 4px; overflow: hidden;
}
.z-cert-meta-item {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 16px 32px;
}
.z-cert-meta-label {
    font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
    color: var(--z-gold-deep); font-weight: 700;
}
.z-cert-meta-val {
    font-family: var(--z-font-serif);
    font-size: 17px; font-weight: 600; color: #2a1f04;
}
.z-cert-meta-sep { width: 1px; background: rgba(184, 137, 44, .35); align-self: stretch; }

.z-cert-seal { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 24px; }
.z-cert-seal-svg {
    width: 76px; height: 76px; color: var(--z-gold-deep);
    filter: drop-shadow(0 3px 10px rgba(140, 106, 26, .30));
}
.z-cert-seal-label {
    font-family: var(--z-font-serif);
    font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
    color: var(--z-gold-deep); font-weight: 700;
}
.z-cert-footer-note {
    font-family: var(--z-font-serif);
    font-style: italic;
    font-size: 12.5px; color: var(--z-text-dim); margin: 0;
    letter-spacing: .04em;
}

.z-cert-actions { display: flex; gap: 14px; justify-content: center; }

/* ── Spinner ── */
.z-spin { animation: z-spin 1s linear infinite; display: inline-block; }
@keyframes z-spin { to { transform: rotate(360deg); } }



/* ============================================================
   PAGE LAYOUT WITH CHAT SIDEBAR
   ============================================================ */
/* Chat sidebar — now a slide-in panel toggled from the topbar */
.z-chat-sidebar {
    position: fixed;
    top: 56px;      /* clear the dashboard topbar */
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 92vw;
    overflow: hidden;
    background: var(--z-bg-panel);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--z-border);
    box-shadow: -10px 0 32px rgba(15, 23, 36, 0.12);
    z-index: 1035;
    transform: translateX(100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.z-chat-sidebar.is-open { transform: translateX(0); }
.z-chat-sidebar[hidden] { display: none; }

/* Chat toggle button in topbar — active state when panel is open */
.z-topbar-icon-btn--chat.is-active {
    background: rgba(var(--z-primary-rgb), 0.1);
    color: var(--z-primary, #1e2ee6);
}

/* ============================================================
   ZOEONE PANEL  (fills the sidebar — no overlay)
   ============================================================ */
.z-tutor-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    overflow: hidden;
    font-family: var(--z-font-sans);
}

/* Header — same gradient + padding as left profile card (.z-dash-user) */
.z-tutor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 20px 26px;
    background: linear-gradient(140deg, var(--z-bg-blue-deep) 0%, var(--z-primary) 60%, var(--z-primary-light) 100%);
    color: #fff;
    flex-shrink: 0;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.z-tutor-header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    text-align: center;
}
.z-tutor-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: 2px solid rgba(255,255,255,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--z-font-serif);
    font-weight: 600;
    font-size: 24px;
    flex-shrink: 0;
}
.z-tutor-name-row { text-align: center; }
.z-tutor-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.z-tutor-status {
    font-size: 11px;
    opacity: .85;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    background: rgba(255,255,255,.14);
    border-radius: var(--z-radius-pill);
    padding: 2px 10px;
}
.z-tutor-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(74,222,128,.3);
    animation: tutorDotPulse 2.5s ease-in-out infinite;
}
@keyframes tutorDotPulse {
    0%,100% { opacity:1; }
    50%      { opacity:.45; }
}
.z-tutor-header { position: relative; }
.z-tutor-header-actions {
    position: absolute;
    top: 12px;
    right: 12px;
}
.z-tutor-tts-toggle {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.8);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.z-tutor-tts-toggle:hover  { background: rgba(255,255,255,.22); color: #fff; }
.z-tutor-tts-toggle.is-active { color: #fcd34d; background: rgba(255,255,255,.15); }
.z-tutor-tts-toggle.is-muted  { opacity: .35; }

/* Body */
.z-tutor-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* Messages */
.z-tutor-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}
.z-tutor-messages::-webkit-scrollbar       { width: 4px; }
.z-tutor-messages::-webkit-scrollbar-track { background: transparent; }
.z-tutor-messages::-webkit-scrollbar-thumb { background: var(--z-border-strong); border-radius: 4px; }

.z-tutor-msg-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    animation: z-msg-in .3s var(--z-ease-out) both;
}
.z-tutor-msg-row.user {
    justify-content: flex-end;
    animation-name: z-msg-in-right;
}
.z-tutor-msg-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--z-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
}
.z-tutor-bubble {
    max-width: 84%;
    padding: 11px 15px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    font-size: 13.5px;
    line-height: 1.6;
    word-break: break-word;
    background: var(--z-primary-softer);
    color: var(--z-text);
    border: 1px solid var(--z-primary-soft);
}
.z-tutor-msg-row.user .z-tutor-bubble {
    background: var(--z-primary);
    color: #fff;
    border-color: transparent;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 10px rgba(30, 42, 120,.25);
}

/* Typing */
.z-tutor-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 16px 6px;
    flex-shrink: 0;
}
.z-tutor-typing[hidden] { display: none; }
.z-tutor-typing span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--z-primary-light);
    animation: tutorBounce 1.2s infinite;
}
.z-tutor-typing span:nth-child(2) { animation-delay:.18s; }
.z-tutor-typing span:nth-child(3) { animation-delay:.36s; }
@keyframes tutorBounce {
    0%,80%,100% { transform:translateY(0); opacity:.4; }
    40%         { transform:translateY(-5px); opacity:1; }
}

/* Input */
.z-tutor-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 2px solid var(--z-primary-soft);
    background: var(--z-bg-panel);
    flex-shrink: 0;
}
.z-tutor-input {
    flex: 1; min-width: 0;
    border: 1.5px solid var(--z-border-strong);
    border-radius: var(--z-radius-pill);
    padding: 10px 16px;
    font-size: 13.5px;
    background: var(--z-bg);
    color: var(--z-text);
    outline: none;
    font-family: var(--z-font-sans);
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.z-tutor-input:focus {
    border-color: var(--z-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--z-primary-softer);
}
.z-tutor-input::placeholder { color: var(--z-text-dim); }
.z-tutor-send {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--z-primary);
    border: none; color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform .15s, background .15s, box-shadow .15s;
    box-shadow: 0 3px 12px rgba(30, 42, 120,.35);
}
.z-tutor-send:hover    { transform: scale(1.1); background: var(--z-primary-dark); box-shadow: 0 4px 16px rgba(30, 42, 120,.45); }
.z-tutor-send:disabled { opacity: .4; cursor: default; transform: none; box-shadow: none; }

/* Token usage meter */
.z-tutor-token-meter {
    padding: 8px 16px 9px;
    background: var(--z-bg-subtle, #f8f9fb);
    border-bottom: 1px solid var(--z-border);
    flex-shrink: 0;
}
.z-tutor-token-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 500;
    color: var(--z-text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.01em;
}
.z-tutor-token-bar {
    height: 5px;
    background: var(--z-border-strong, #e2e6ea);
    border-radius: var(--z-radius-pill);
    overflow: hidden;
}
.z-tutor-token-bar-fill {
    height: 100%;
    width: var(--token-pct, 0%);
    background: var(--z-primary);
    border-radius: var(--z-radius-pill);
    transition: width .4s ease, background .3s;
}
.z-tutor-token-bar-fill.is-warning  { background: #f59e0b; }
.z-tutor-token-bar-fill.is-critical { background: var(--z-danger, #ef4444); }

/* Hide sidebar on smaller screens */
@media (max-width: 900px) {
    .z-chat-sidebar { display: none; }
}

/* =========================================================
   Score Details — printable report card
   ========================================================= */
.z-sc-actions { display: flex; gap: 8px; align-items: center; }
.z-sc-actions .z-btn { padding: 8px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }

.z-sc-card {
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    box-shadow: var(--z-shadow-md);
    padding: 36px 40px;
    overflow: hidden;
}

/* Glassy gradient masthead — replaces the old flat .z-sc-head + .z-sc-identity.
   Keeps the legacy classes intact for other views that may still use them. */
.z-sc-masthead {
    position: relative;
    overflow: hidden;
    border-radius: var(--z-radius-lg);
    padding: 32px 36px 28px;
    margin: -8px -8px 28px;
    color: #ffffff;
    background:
        radial-gradient(140% 110% at 100% 0%, rgba(var(--z-primary-rgb), 0.45) 0%, rgba(var(--z-primary-rgb), 0) 55%),
        radial-gradient(120% 100% at 0% 100%, rgba(var(--z-primary-rgb), 0.35) 0%, rgba(var(--z-primary-rgb), 0) 55%),
        linear-gradient(135deg, var(--z-bg-blue-deep) 0%, var(--z-primary) 55%, var(--z-primary-dark) 100%);
    box-shadow: 0 20px 60px rgba(var(--z-primary-rgb), 0.35);
    isolation: isolate;
}
.z-sc-masthead-aurora {
    position: absolute; inset: -40%;
    background:
        radial-gradient(50% 50% at 20% 20%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 60%),
        radial-gradient(40% 40% at 80% 90%, rgba(236, 72, 153, 0.35) 0%, rgba(236, 72, 153, 0) 60%);
    filter: blur(40px);
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
}
.z-sc-masthead-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(80% 70% at 60% 20%, #000 10%, transparent 85%);
    -webkit-mask-image: radial-gradient(80% 70% at 60% 20%, #000 10%, transparent 85%);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}
.z-sc-masthead > * { position: relative; z-index: 1; }

.z-sc-masthead-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}
.z-sc-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.z-sc-brand-mark {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.65) 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(14, 20, 70, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}
.z-sc-brand-mark span {
    font-family: var(--z-font-serif);
    font-size: 22px; font-weight: 600;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--z-primary, #1e2ee6), var(--z-primary-light, #6a76ff));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.z-sc-brand-eyebrow {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}
.z-sc-brand-title {
    font-family: var(--z-font-serif);
    font-size: 20px; font-weight: 500;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-top: 2px;
}
.z-sc-report-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px;
    border-radius: var(--z-radius-pill);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff;
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.z-sc-report-badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
}
.z-sc-report-badge-label {
    text-transform: uppercase;
    font-size: 10px; letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.72);
}
.z-sc-report-badge-num { font-weight: 700; }

.z-sc-masthead-identity {
    display: flex; align-items: center; gap: 18px;
    padding: 18px 20px;
    border-radius: var(--z-radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    margin-bottom: 18px;
}
.z-sc-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(140deg, #ffffff 0%, rgba(255, 255, 255, 0.65) 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(14, 20, 70, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}
.z-sc-avatar span {
    font-family: var(--z-font-serif);
    font-size: 24px; font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--z-primary, #1e2ee6), var(--z-primary-light, #6a76ff));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.z-sc-identity-text { flex: 1; min-width: 0; }
.z-sc-identity-eyebrow {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}
.z-sc-identity-name {
    font-family: var(--z-font-serif);
    font-size: 30px; font-weight: 500;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 2px 0 4px;
    line-height: 1.1;
}
.z-sc-identity-email {
    font-size: 13px; color: rgba(255, 255, 255, 0.78);
    font-variant-numeric: tabular-nums;
}
.z-sc-band-badge {
    display: inline-flex; flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--z-band-color, #ffffff) 32%, transparent);
    border: 1px solid color-mix(in srgb, var(--z-band-color, #ffffff) 55%, transparent);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--z-band-color, #ffffff) 25%, transparent);
    color: #ffffff;
    flex-shrink: 0;
}
.z-sc-band-badge-eyebrow {
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}
.z-sc-band-badge-value {
    font-family: var(--z-font-serif);
    font-size: 16px; font-weight: 600;
    margin-top: 2px;
    letter-spacing: -0.01em;
}

.z-sc-pill-rail {
    display: flex; flex-wrap: wrap;
    gap: 8px;
}
.z-sc-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 13px 7px 11px;
    border-radius: var(--z-radius-pill);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    transition: transform .2s ease, background .2s ease;
}
.z-sc-pill:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
}
.z-sc-pill-icon {
    width: 14px; height: 14px;
    color: rgba(255, 255, 255, 0.75);
    flex-shrink: 0;
}
.z-sc-pill-k {
    text-transform: uppercase;
    font-size: 9.5px; letter-spacing: 0.18em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.68);
}
.z-sc-pill-v {
    font-weight: 600; color: #ffffff;
    letter-spacing: 0.01em;
}
.z-sc-pill-accent {
    background: color-mix(in srgb, var(--z-band-color, #ffffff) 30%, rgba(255, 255, 255, 0.1));
    border-color: color-mix(in srgb, var(--z-band-color, #ffffff) 55%, transparent);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--z-band-color, #ffffff) 25%, transparent);
}
.z-sc-pill-accent .z-sc-pill-icon,
.z-sc-pill-accent .z-sc-pill-k { color: rgba(255, 255, 255, 0.9); }

@media (max-width: 760px) {
    .z-sc-masthead { padding: 24px 20px; margin: -4px -4px 20px; }
    .z-sc-masthead-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .z-sc-masthead-identity { flex-direction: column; align-items: flex-start; gap: 12px; }
    .z-sc-band-badge { align-self: stretch; align-items: flex-start; }
    .z-sc-identity-name { font-size: 24px; }
}

.z-sc-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--z-primary);
    margin-bottom: 24px;
}
.z-sc-head-brand { display: flex; align-items: center; gap: 14px; }
.z-sc-head-logo {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(140deg, var(--z-primary) 0%, var(--z-primary-light) 100%);
    color: #fff; font-family: var(--z-font-serif);
    font-size: 20px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    letter-spacing: -0.02em;
}
.z-sc-head-title {
    font-family: var(--z-font-serif);
    font-size: 22px; font-weight: 500; color: var(--z-text);
    letter-spacing: -0.02em;
}
.z-sc-head-sub { font-size: 12px; color: var(--z-text-muted); margin-top: 2px; }
.z-sc-head-meta { display: flex; flex-direction: column; gap: 4px; min-width: 190px; }
.z-sc-meta-row { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; }
.z-sc-meta-label { color: var(--z-text-muted); }
.z-sc-meta-value { color: var(--z-text); font-weight: 600; }

.z-sc-identity {
    display: flex; justify-content: space-between; align-items: center;
    gap: 24px; margin-bottom: 24px;
}
.z-sc-identity-block { flex: 1; min-width: 0; }
.z-sc-identity-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--z-text-muted);
    margin-bottom: 6px;
}
.z-sc-identity-name {
    font-family: var(--z-font-serif);
    font-size: 28px; font-weight: 500; color: var(--z-text);
    letter-spacing: -0.02em; line-height: 1.1;
}
.z-sc-identity-sub { font-size: 13px; color: var(--z-text-muted); margin-top: 4px; }

.z-sc-ring-wrap { position: relative; width: 144px; height: 144px; flex-shrink: 0; }
.z-sc-ring { width: 144px; height: 144px; transform: rotate(-90deg); }
.z-sc-ring-bg { fill: none; stroke: var(--z-primary-softer); stroke-width: 10; }
.z-sc-ring-fill {
    fill: none; stroke: var(--z-primary); stroke-width: 10;
    stroke-linecap: round; transition: stroke-dashoffset .8s ease;
}
.z-sc-ring-label {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.z-sc-ring-num {
    font-family: var(--z-font-serif);
    font-size: 44px; font-weight: 500; color: var(--z-text);
    letter-spacing: -0.03em; line-height: 1;
}
.z-sc-ring-denom { font-size: 12px; color: var(--z-text-muted); margin-top: 2px; }

.z-sc-headline {
    background: var(--z-primary-softer);
    border-left: 3px solid var(--z-primary);
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
}
.z-sc-headline h2 {
    margin: 0; font-family: var(--z-font-serif); font-weight: 500;
    font-size: 18px; letter-spacing: -0.01em; color: var(--z-text);
    line-height: 1.4;
}

.z-sc-section { margin-bottom: 24px; page-break-inside: avoid; }
.z-sc-section-title {
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--z-primary);
    margin: 0 0 12px; padding-bottom: 6px;
    border-bottom: 1px solid var(--z-border);
}
.z-sc-para { margin: 0 0 10px; font-size: 13px; color: var(--z-text); line-height: 1.6; }
.z-sc-list { list-style: none; padding: 0; margin: 0; }
.z-sc-list li {
    position: relative; padding: 6px 0 6px 18px;
    font-size: 13px; color: var(--z-text); line-height: 1.5;
    border-bottom: 1px dashed var(--z-border);
}
.z-sc-list li:last-child { border-bottom: 0; }
.z-sc-list li::before {
    content: "•"; position: absolute; left: 4px; top: 6px;
    color: var(--z-primary); font-weight: 700;
}

.z-sc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.z-sc-trait {
    border: 1px solid var(--z-border);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fafbfd;
}
.z-sc-trait-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--z-text-muted);
    margin-bottom: 4px;
}
.z-sc-trait-value {
    font-family: var(--z-font-serif);
    font-size: 20px; font-weight: 500; color: var(--z-text);
    letter-spacing: -0.01em;
}
.z-sc-trait-sub { font-size: 12px; color: var(--z-text-muted); margin-top: 4px; line-height: 1.5; }

.z-sc-careers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.z-sc-career {
    border: 1px solid var(--z-border);
    border-radius: 10px;
    padding: 12px 14px;
}
.z-sc-career-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.z-sc-career-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--z-text); }
.z-sc-career-rationale { margin: 8px 0 0; font-size: 12px; color: var(--z-text-muted); line-height: 1.5; }

.z-sc-foot {
    display: flex; justify-content: space-between;
    margin-top: 28px; padding-top: 14px;
    border-top: 1px solid var(--z-border);
    font-size: 11px; color: var(--z-text-muted);
}

/* ---- Score page "Take another survey" CTA ---- */
.z-score-hero-actions {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-top: 16px;
}

/* ---- Survey history ---- */
.z-history-actions {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 18px;
}
/* History cards — responsive grid matching the tests-score (.z-test-grid)
   layout: auto-fill tiles that scale with the viewport. Each card stacks
   its score circle, title, headline and actions vertically. */
.z-history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.z-history-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--z-bg-panel, #fff);
    border: 1px solid var(--z-border, #e5e9f2);
    border-radius: var(--z-radius-lg, 14px);
    padding: 20px 22px;
    min-height: 240px;
    box-shadow: var(--z-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.z-history-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--z-shadow-md);
    border-color: var(--z-border-strong, var(--z-primary-softer, #d9dffb));
}
.z-history-card.is-latest { border-color: var(--z-primary, #1e2ee6); }
.z-history-card-left { align-self: flex-start; }
.z-history-score {
    width: 72px; height: 72px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--z-primary-softer, #eef1fd);
    color: var(--z-primary, #1e2ee6);
    font-size: 24px; font-weight: 700; line-height: 1;
}
.z-history-score span { font-size: 10px; font-weight: 500; opacity: .6; margin-top: 2px; }
.z-history-score.is-muted { background: #f3f5f9; color: var(--z-text-muted, #5b6478); }
.z-history-card-body { flex: 1; min-width: 0; }
.z-history-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.z-history-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--z-text, #0f172a); }
.z-history-headline {
    margin: 6px 0 0; font-size: 14px; color: var(--z-text, #0f172a);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.z-history-meta { margin-top: 8px; font-size: 12px; color: var(--z-text-muted, #5b6478); }
.z-history-card-right {
    display: flex; flex-direction: row; gap: 8px; align-items: stretch;
    margin-top: auto;
}
.z-history-card-right .z-btn { white-space: nowrap; flex: 1; justify-content: center; }

/* ---- Growth comparison ---- */
/* Legacy .z-growth-hero* rules were removed — the new design lives further
   down in this file. Keeping them created cascade merges that visually
   broke the redesigned hero. */

.z-growth-legend {
    display: flex; gap: 20px;
    font-size: 12px; color: var(--z-text-muted, #5b6478);
    margin: 0 2px 14px;
}
.z-growth-legend-swatch {
    display: inline-block; width: 12px; height: 12px; border-radius: 3px;
    vertical-align: middle; margin-right: 6px;
}
.z-growth-legend-swatch--before { background: #cbd5e1; }
.z-growth-legend-swatch--now    { background: var(--z-primary, #1e2ee6); }

.z-growth-rows { display: flex; flex-direction: column; gap: 14px; }
.z-growth-row {
    display: grid;
    grid-template-columns: 160px 1fr 60px;
    gap: 14px; align-items: center;
}
.z-growth-row-label { font-size: 13px; font-weight: 600; color: var(--z-text, #0f172a); }
.z-growth-row-bars { display: flex; flex-direction: column; gap: 4px; }
.z-growth-bar {
    position: relative; height: 14px;
    background: #f3f5f9; border-radius: 7px; overflow: hidden;
}
.z-growth-bar-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: #cbd5e1; border-radius: 7px;
    transition: width .4s var(--z-ease-out);
}
.z-growth-bar--now .z-growth-bar-fill { background: var(--z-primary, #1e2ee6); }
.z-growth-bar-num {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    font-size: 10px; font-weight: 700; color: var(--z-text, #0f172a);
}
.z-growth-row-delta { text-align: right; }
.z-delta {
    font-size: 12px; font-weight: 700;
    padding: 3px 8px; border-radius: 999px;
    display: inline-block; min-width: 36px; text-align: center;
}
.z-delta-up   { background: #ecfdf5; color: #047857; }
.z-delta-down { background: #fef2f2; color: #b91c1c; }
.z-delta-flat { background: #f3f5f9; color: var(--z-text-muted, #5b6478); }

.z-growth-careers { margin-top: 12px; }
.z-growth-careers:first-child { margin-top: 0; }
.z-growth-careers-label {
    font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
    color: var(--z-text-muted, #5b6478); margin-bottom: 6px;
}
.z-course-pill--new     { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.z-course-pill--dropped { background: #fef2f2; color: #991b1b; border-color: #fecaca; text-decoration: line-through; opacity: .8; }

@media (max-width: 760px) {
    .z-growth-row { grid-template-columns: 110px 1fr 48px; gap: 10px; }
    .z-history-list { grid-template-columns: 1fr; }
    .z-history-card { min-height: 0; padding: 16px 18px; }
}

/* ---- Print ---- */
.z-no-print { }
@media print {
    @page { margin: 12mm; }
    html, body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
    }
    .z-no-print,
    .z-dash-sidebar,
    .z-chat-sidebar,
    .z-site-header,
    .z-footer { display: none !important; }
    .z-dashboard {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }
    .z-dash-content { padding: 0 !important; }
    .z-sc-card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
    .z-sc-section { page-break-inside: avoid; break-inside: avoid; }
    .z-career-fit-fill,
    .z-skill-bar-fill,
    .z-bigfive-bar-fill {
        background: #1e2ee6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .z-sc-ring-fill  { stroke: #1e2ee6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .z-sc-ring-bg    { stroke: #e4e8fb !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .z-sc-headline   { background: #eef1fd !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .z-sc-head-logo  { background: #1e2ee6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: #000 !important; text-decoration: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
    .z-sc-card { padding: 20px 18px; }
    .z-sc-head { flex-direction: column; gap: 12px; }
    .z-sc-head-meta { width: 100%; }
    .z-sc-identity { flex-direction: column; align-items: flex-start; }
    .z-sc-grid-2, .z-sc-careers { grid-template-columns: 1fr; }
}

/* ======================================================================
   Admin portal styles
   Tables, filterbar, pager, transcript bubbles, chapter/lesson rows.
   Reuses z-dash-sidebar / z-dash-content / z-dash-card wrappers for layout.
   ====================================================================== */

/* ---- Admin wide layout (users list etc.) ---- */
.z-dashboard--wide .z-dash-content {
    max-width: none;
    padding-left: 24px;
    padding-right: 24px;
}

/* ---- Admin topbar + login ---- */
.z-admin-topbar .z-topbar-inner { align-items: center; }
.z-admin-chip {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--z-primary);
    background: var(--z-primary-soft);
    border-radius: var(--z-radius-pill);
    vertical-align: middle;
}
.z-admin-login-wrap {
    display: grid;
    place-items: center;
    min-height: 60vh;
    padding: 40px 16px;
}
.z-admin-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    padding: 36px 32px;
    box-shadow: var(--z-shadow-md);
}
.z-admin-login-head { text-align: center; margin-bottom: 24px; }
.z-admin-login-logo {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    margin: 0 auto 14px;
    background: var(--z-primary);
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    border-radius: var(--z-radius-md);
}
.z-admin-login-title { font-size: 22px; margin: 0 0 4px; }
.z-admin-login-sub  { color: var(--z-text-muted); margin: 0; font-size: 14px; }

/* ---- Admin back-link + card titles ---- */
.z-admin-back {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--z-text-muted);
    text-decoration: none;
}
.z-admin-back:hover { color: var(--z-primary); }
.z-admin-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--z-text);
}
.z-admin-card-actions { margin-top: 14px; }
.z-admin-muted { color: var(--z-text-muted); }

/* ---- Admin filter bar (search + buttons) ---- */
.z-admin-filterbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.z-admin-search { flex: 1 1 220px; max-width: 360px; }
.z-admin-filter-spacer { flex: 1 1 auto; }
.z-admin-filterbar--wrap { align-items: flex-end; }
.z-admin-filter-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
}
.z-admin-filter-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--z-text-muted);
}
.z-input-sm {
    padding: 6px 8px;
    font-size: 13px;
    min-height: 32px;
    border-radius: 8px;
}
.z-chip-success { background: #d1fae5; color: #065f46; }
.z-chip-amber   { background: #fef3c7; color: #92400e; }
.z-chip-sm {
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-width: 0;
    box-shadow: none;
    cursor: default;
    transition: none;
    white-space: nowrap;
}
.z-chip-sm:hover { transform: none; border-color: transparent; color: inherit; box-shadow: none; }
.z-chip-meta { font-weight: 500; opacity: 0.75; margin-left: 2px; }
.z-admin-score  { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--z-primary-dark); }
.z-admin-small  { font-size: 12px; margin-top: 1px; }

/* Inline info badge — click/hover reveals a floating tooltip. Rendered via
   AdminIcons::infoBadge(). The badge sits in the normal flow; the tooltip
   itself is a single body-level element positioned by common.js so no
   scroll-container can clip it. */
.z-info-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--z-text-muted);
    cursor: pointer;
    opacity: 0.75;
    transition: color 0.15s, background 0.15s, opacity 0.15s;
    vertical-align: middle;
    line-height: 1;
}
.z-info-badge:hover,
.z-info-badge:focus,
.z-info-badge.is-open {
    color: var(--z-primary);
    background: var(--z-primary-softer);
    opacity: 1;
    outline: none;
}
.z-info-badge > svg { display: block; width: 14px; height: 14px; }

/* Summary cards grid on /admin/surveys. Clickable — each links to the same
   list filtered by that status. The chosen card shows an outlined border. */
.z-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 18px 0 20px;
}
.z-stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--z-border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.z-stat-card:hover {
    border-color: var(--z-primary);
    box-shadow: 0 4px 12px rgba(var(--z-primary-rgb), 0.08);
    transform: translateY(-1px);
}
.z-stat-card.is-active {
    border-color: var(--z-primary);
    background: var(--z-primary-softer);
}
.z-stat-card-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--z-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.z-stat-card-value {
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--z-primary-dark);
    line-height: 1;
}
.z-stat-card--completed-with-score .z-stat-card-value { color: #0f7a3b; }
.z-stat-card--completed-no-score   .z-stat-card-value { color: #c04a1e; }
.z-stat-card--in-progress          .z-stat-card-value { color: #b58a0a; }

/* Right-side action group in a z-dash-heading row (export, actions, etc). */
.z-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.z-heading-actions .z-btn svg { vertical-align: middle; margin-right: 6px; }

/* Floating tooltip appended to <body> by common.js. One element, re-used. */
.z-info-floating {
    position: fixed;
    z-index: 9999;
    min-width: 220px;
    max-width: 320px;
    padding: 10px 12px;
    background: #1f2340;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
}
.z-info-floating.is-visible { opacity: 1; }
.z-info-floating::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
}
.z-info-floating[data-pos="above"]::after {
    top: 100%;
    border-top-color: #1f2340;
}
.z-info-floating[data-pos="below"]::after {
    bottom: 100%;
    border-bottom-color: #1f2340;
}

/* ---- Pretty filter panel (admin/surveys) ---- */
.z-filter-panel {
    background: linear-gradient(180deg, #ffffff 0%, var(--z-primary-softer) 160%);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    padding: 18px 20px 16px;
    margin-bottom: 18px;
    box-shadow: var(--z-shadow-sm);
}
.z-filter-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.z-filter-eyebrow {
    font-family: var(--z-font-serif);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--z-text);
}
.z-filter-subhead {
    font-size: 12.5px;
    color: var(--z-text-muted);
    margin-top: 2px;
}
.z-filter-head-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.z-filter-search-wrap {
    position: relative;
    margin-bottom: 12px;
}
.z-filter-search {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--z-border);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: var(--z-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.z-filter-search:focus {
    outline: none;
    border-color: var(--z-primary);
    box-shadow: 0 0 0 3px rgba(30, 42, 120, 0.14);
}
.z-filter-search-icon {
    position: absolute;
    left: 11px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--z-text-muted);
    pointer-events: none;
}
.z-filter-search-icon svg { width: 100%; height: 100%; display: block; }

.z-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.z-filter-grid.z-filter-grid-row {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    gap: 10px;
    justify-content: flex-start;
}
.z-filter-grid.z-filter-grid-row > .z-filter-field {
    flex: 1 1 0;
    min-width: 120px;
    max-width: 150px;
}
.z-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.z-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--z-text-muted);
}
.z-filter-icon {
    display: inline-flex;
    width: 12px; height: 12px;
    color: var(--z-primary);
}
.z-filter-icon svg { width: 100%; height: 100%; display: block; }
.z-filter-input {
    padding: 8px 10px;
    border: 1px solid var(--z-border);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: var(--z-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.z-filter-input:focus {
    outline: none;
    border-color: var(--z-primary);
    box-shadow: 0 0 0 3px rgba(30, 42, 120, 0.14);
}

.z-filter-segments {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.z-filter-segments-spacer { flex: 1 1 auto; }

/* Single-row filter layout: every filter on ONE horizontal line, no wrapping.
   On very narrow viewports the row can scroll horizontally rather than stack. */
.z-filter-oneline {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
}
.z-filter-oneline > .z-filter-field {
    flex: 1 1 0;
    min-width: 0;
}
.z-filter-oneline > .z-filter-field--search { flex: 2 1 0; min-width: 160px; }
.z-filter-oneline > .z-filter-field--narrow { flex: 0 0 80px; }
.z-filter-oneline .z-filter-input { width: 100%; min-width: 0; }
.z-filter-oneline .z-filter-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.z-filter-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.z-filter-input--compact {
    padding: 6px 8px;
    min-height: unset;
    font-size: 12.5px;
    width: 70px;
}
.z-admin-resultbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: var(--z-primary-softer);
    border: 1px solid var(--z-border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--z-text-muted);
}
.z-admin-resultbar strong { color: var(--z-text); font-weight: 700; }
.z-admin-resultbar-page { font-variant-numeric: tabular-nums; }

/* ============================================================
   Admin dashboard
   ============================================================ */
.z-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.z-kpi-card {
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: var(--z-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.z-kpi-card:hover { transform: translateY(-1px); box-shadow: var(--z-shadow-md); }
.z-kpi-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
}
.z-kpi-icon svg { width: 18px; height: 18px; }
.z-kpi-icon--primary { background: linear-gradient(135deg, var(--z-primary) 0%, var(--z-primary-light) 100%); }
.z-kpi-icon--teal    { background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%); }
.z-kpi-icon--amber   { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.z-kpi-icon--rose    { background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%); }
.z-kpi-body { flex: 1 1 auto; min-width: 0; }
.z-kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--z-text-muted);
    margin-bottom: 4px;
}
.z-kpi-value {
    font-family: var(--z-font-serif);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--z-text);
    line-height: 1.1;
}
.z-kpi-value small { font-size: 13px; color: var(--z-text-muted); font-weight: 500; margin-left: 2px; }
.z-kpi-sub {
    margin-top: 6px;
    font-size: 12px;
    color: var(--z-text-muted);
}
.z-kpi-sub strong { color: var(--z-text); font-weight: 700; }

.z-analytics-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
/* A row that holds a single card — collapse the 2fr/1fr split so the card
   fills the full width instead of leaving an empty column beside it. */
.z-analytics-row--single { grid-template-columns: 1fr; }
/* Two equal-width cards side by side (default row is 2fr/1fr). */
.z-analytics-row--split { grid-template-columns: 1fr 1fr; }
.z-analytics-card { padding: 16px 18px; }
.z-analytics-card--wide { min-width: 0; }

/* Daily activity bars */
.z-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 140px;
    padding: 6px 0 4px;
    border-bottom: 1px dashed var(--z-border);
}
.z-chart-day {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}
.z-chart-bar-pair {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    width: 100%;
    justify-content: center;
}
.z-chart-bar {
    width: 7px;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    transition: opacity .15s ease;
}
.z-chart-bar:hover { opacity: 0.75; }
.z-chart-bar--started   { background: var(--z-primary); }
.z-chart-bar--completed { background: #14b8a6; }
.z-chart-day-label {
    font-size: 10px;
    color: var(--z-text-muted);
    font-variant-numeric: tabular-nums;
}
.z-chart-legend {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--z-text-muted);
}
.z-chart-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.z-chart-swatch { width: 10px; height: 10px; border-radius: 2px; }
.z-chart-swatch--started   { background: var(--z-primary); }
.z-chart-swatch--completed { background: #14b8a6; }

/* Horizontal distribution bars (score buckets / categories / countries) */
.z-dist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.z-dist-row {
    display: grid;
    grid-template-columns: 90px 1fr 36px;
    align-items: center;
    gap: 10px;
}
.z-dist-label {
    font-size: 12.5px;
    color: var(--z-text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.z-dist-label--wide { grid-column: 1 / 2; }
.z-dist-bar {
    display: block;
    height: 8px;
    background: var(--z-primary-softer);
    border-radius: 999px;
    overflow: hidden;
}
.z-dist-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--z-primary) 0%, var(--z-primary-light) 100%);
    border-radius: 999px;
    min-width: 2px;
}
.z-dist-bar-fill--teal  { background: linear-gradient(90deg, #0d9488 0%, #2dd4bf 100%); }
.z-dist-bar-fill--amber { background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%); }

/* MHQ band colour palette — used by the MHQ Insights dashboard for the band
   distribution bars, stacked monthly bars, KPI tiles and badges. 7-band
   "Option A" scale, ordered from Needs support (deep red) through Thriving
   (blue). */
.z-mhq-band--needs-support { background: linear-gradient(90deg, #450a0a 0%, #7f1d1d 100%); }
.z-mhq-band--struggling    { background: linear-gradient(90deg, #7f1d1d 0%, #dc2626 100%); }
.z-mhq-band--strained      { background: linear-gradient(90deg, #9a3412 0%, #ea580c 100%); }
.z-mhq-band--coping        { background: linear-gradient(90deg, #a16207 0%, #facc15 100%); }
.z-mhq-band--steady        { background: linear-gradient(90deg, #4d7c0f 0%, #a3e635 100%); }
.z-mhq-band--flourishing   { background: linear-gradient(90deg, #166534 0%, #22c55e 100%); }
.z-mhq-band--thriving      { background: linear-gradient(90deg, #1e40af 0%, #3b82f6 100%); }

/* Solid-fill variants for swatches / stacked segments. */
.z-mhq-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.z-mhq-swatch--needs-support { background: #7f1d1d; }
.z-mhq-swatch--struggling    { background: #dc2626; }
.z-mhq-swatch--strained      { background: #ea580c; }
.z-mhq-swatch--coping        { background: #facc15; }
.z-mhq-swatch--steady        { background: #a3e635; }
.z-mhq-swatch--flourishing   { background: #22c55e; }
.z-mhq-swatch--thriving      { background: #3b82f6; }

/* --- Other-test palettes (MBTI / Enneagram / Big Five / RIASEC / CEFR /
   Leadership). The swatches on the legend and the <path> fills on the
   doughnut both reference these — keep them in sync. --- */

/* MBTI: 16 types grouped by temperament (NT indigos, NF violets, SJ teals, SP ambers). */
.z-mhq-swatch--intj { background: #3730A3; } .z-mhq-pie-slice--intj { fill: #3730A3; }
.z-mhq-swatch--intp { background: #4338CA; } .z-mhq-pie-slice--intp { fill: #4338CA; }
.z-mhq-swatch--entj { background: #6366F1; } .z-mhq-pie-slice--entj { fill: #6366F1; }
.z-mhq-swatch--entp { background: #818CF8; } .z-mhq-pie-slice--entp { fill: #818CF8; }
.z-mhq-swatch--infj { background: #6D28D9; } .z-mhq-pie-slice--infj { fill: #6D28D9; }
.z-mhq-swatch--infp { background: #8B5CF6; } .z-mhq-pie-slice--infp { fill: #8B5CF6; }
.z-mhq-swatch--enfj { background: #A78BFA; } .z-mhq-pie-slice--enfj { fill: #A78BFA; }
.z-mhq-swatch--enfp { background: #C4B5FD; } .z-mhq-pie-slice--enfp { fill: #C4B5FD; }
.z-mhq-swatch--istj { background: #0F766E; } .z-mhq-pie-slice--istj { fill: #0F766E; }
.z-mhq-swatch--isfj { background: #0D9488; } .z-mhq-pie-slice--isfj { fill: #0D9488; }
.z-mhq-swatch--estj { background: #14B8A6; } .z-mhq-pie-slice--estj { fill: #14B8A6; }
.z-mhq-swatch--esfj { background: #5EEAD4; } .z-mhq-pie-slice--esfj { fill: #5EEAD4; }
.z-mhq-swatch--istp { background: #B45309; } .z-mhq-pie-slice--istp { fill: #B45309; }
.z-mhq-swatch--isfp { background: #D97706; } .z-mhq-pie-slice--isfp { fill: #D97706; }
.z-mhq-swatch--estp { background: #F59E0B; } .z-mhq-pie-slice--estp { fill: #F59E0B; }
.z-mhq-swatch--esfp { background: #FBBF24; } .z-mhq-pie-slice--esfp { fill: #FBBF24; }
/* MBTI temperament outcome buckets. */
.z-mhq-swatch--analyst  { background: #4338CA; } .z-mhq-pie-slice--analyst  { fill: #4338CA; }
.z-mhq-swatch--diplomat { background: #8B5CF6; } .z-mhq-pie-slice--diplomat { fill: #8B5CF6; }
.z-mhq-swatch--sentinel { background: #0D9488; } .z-mhq-pie-slice--sentinel { fill: #0D9488; }
.z-mhq-swatch--explorer { background: #D97706; } .z-mhq-pie-slice--explorer { fill: #D97706; }

/* Enneagram — 9 types, same palette the PDF uses (ScoreCardPdf::ENN_COLORS). */
.z-mhq-swatch--enn-1 { background: #DC2626; } .z-mhq-pie-slice--enn-1 { fill: #DC2626; }
.z-mhq-swatch--enn-2 { background: #EC4899; } .z-mhq-pie-slice--enn-2 { fill: #EC4899; }
.z-mhq-swatch--enn-3 { background: #F59E0B; } .z-mhq-pie-slice--enn-3 { fill: #F59E0B; }
.z-mhq-swatch--enn-4 { background: #8B5CF6; } .z-mhq-pie-slice--enn-4 { fill: #8B5CF6; }
.z-mhq-swatch--enn-5 { background: #2563EB; } .z-mhq-pie-slice--enn-5 { fill: #2563EB; }
.z-mhq-swatch--enn-6 { background: #0D9488; } .z-mhq-pie-slice--enn-6 { fill: #0D9488; }
.z-mhq-swatch--enn-7 { background: #F97316; } .z-mhq-pie-slice--enn-7 { fill: #F97316; }
.z-mhq-swatch--enn-8 { background: #991B1B; } .z-mhq-pie-slice--enn-8 { fill: #991B1B; }
.z-mhq-swatch--enn-9 { background: #059669; } .z-mhq-pie-slice--enn-9 { fill: #059669; }
.z-mhq-swatch--head  { background: #2563EB; } .z-mhq-pie-slice--head  { fill: #2563EB; }
.z-mhq-swatch--heart { background: #EC4899; } .z-mhq-pie-slice--heart { fill: #EC4899; }
.z-mhq-swatch--gut   { background: #DC2626; } .z-mhq-pie-slice--gut   { fill: #DC2626; }

/* Big Five — same colours as the PDF big-five chart (BF_META). */
.z-mhq-swatch--bf-openness          { background: #8B5CF6; } .z-mhq-pie-slice--bf-openness          { fill: #8B5CF6; }
.z-mhq-swatch--bf-conscientiousness { background: #0D9488; } .z-mhq-pie-slice--bf-conscientiousness { fill: #0D9488; }
.z-mhq-swatch--bf-extraversion      { background: #F59E0B; } .z-mhq-pie-slice--bf-extraversion      { fill: #F59E0B; }
.z-mhq-swatch--bf-agreeableness     { background: #EC4899; } .z-mhq-pie-slice--bf-agreeableness     { fill: #EC4899; }
.z-mhq-swatch--bf-neuroticism       { background: #DC2626; } .z-mhq-pie-slice--bf-neuroticism       { fill: #DC2626; }
.z-mhq-swatch--bf-low  { background: #dc2626; } .z-mhq-pie-slice--bf-low  { fill: #dc2626; }
.z-mhq-swatch--bf-mid  { background: #facc15; } .z-mhq-pie-slice--bf-mid  { fill: #facc15; }
.z-mhq-swatch--bf-high { background: #22c55e; } .z-mhq-pie-slice--bf-high { fill: #22c55e; }

/* RIASEC — same as PDF (RIASEC_COLOR). */
.z-mhq-swatch--ri-realistic     { background: #D97706; } .z-mhq-pie-slice--ri-realistic     { fill: #D97706; }
.z-mhq-swatch--ri-investigative { background: #0D9488; } .z-mhq-pie-slice--ri-investigative { fill: #0D9488; }
.z-mhq-swatch--ri-artistic      { background: #BE185D; } .z-mhq-pie-slice--ri-artistic      { fill: #BE185D; }
.z-mhq-swatch--ri-social        { background: #4338CA; } .z-mhq-pie-slice--ri-social        { fill: #4338CA; }
.z-mhq-swatch--ri-enterprising  { background: #DC2626; } .z-mhq-pie-slice--ri-enterprising  { fill: #DC2626; }
.z-mhq-swatch--ri-conventional  { background: #059669; } .z-mhq-pie-slice--ri-conventional  { fill: #059669; }
.z-mhq-swatch--ri-things { background: #0D9488; } .z-mhq-pie-slice--ri-things { fill: #0D9488; }
.z-mhq-swatch--ri-ideas  { background: #BE185D; } .z-mhq-pie-slice--ri-ideas  { fill: #BE185D; }
.z-mhq-swatch--ri-people { background: #4338CA; } .z-mhq-pie-slice--ri-people { fill: #4338CA; }

/* English (CEFR). Six-step gradient from red-ish A1 up to blue C2. */
.z-mhq-swatch--cefr-a1 { background: #dc2626; } .z-mhq-pie-slice--cefr-a1 { fill: #dc2626; }
.z-mhq-swatch--cefr-a2 { background: #ea580c; } .z-mhq-pie-slice--cefr-a2 { fill: #ea580c; }
.z-mhq-swatch--cefr-b1 { background: #facc15; } .z-mhq-pie-slice--cefr-b1 { fill: #facc15; }
.z-mhq-swatch--cefr-b2 { background: #a3e635; } .z-mhq-pie-slice--cefr-b2 { fill: #a3e635; }
.z-mhq-swatch--cefr-c1 { background: #22c55e; } .z-mhq-pie-slice--cefr-c1 { fill: #22c55e; }
.z-mhq-swatch--cefr-c2 { background: #3b82f6; } .z-mhq-pie-slice--cefr-c2 { fill: #3b82f6; }
.z-mhq-swatch--cefr-beg { background: #dc2626; } .z-mhq-pie-slice--cefr-beg { fill: #dc2626; }
.z-mhq-swatch--cefr-int { background: #facc15; } .z-mhq-pie-slice--cefr-int { fill: #facc15; }
.z-mhq-swatch--cefr-adv { background: #22c55e; } .z-mhq-pie-slice--cefr-adv { fill: #22c55e; }

/* Leadership — distinct hues per skill group, L/M/H outcomes share the MHQ palette. */
.z-mhq-swatch--ld-self   { background: #BE185D; } .z-mhq-pie-slice--ld-self   { fill: #BE185D; }
.z-mhq-swatch--ld-people { background: #4338CA; } .z-mhq-pie-slice--ld-people { fill: #4338CA; }
.z-mhq-swatch--ld-work   { background: #0D9488; } .z-mhq-pie-slice--ld-work   { fill: #0D9488; }
.z-mhq-swatch--ld-change { background: #F59E0B; } .z-mhq-pie-slice--ld-change { fill: #F59E0B; }
.z-mhq-swatch--ld-vision { background: #8B5CF6; } .z-mhq-pie-slice--ld-vision { fill: #8B5CF6; }
.z-mhq-swatch--ld-low  { background: #dc2626; } .z-mhq-pie-slice--ld-low  { fill: #dc2626; }
.z-mhq-swatch--ld-mid  { background: #facc15; } .z-mhq-pie-slice--ld-mid  { fill: #facc15; }
.z-mhq-swatch--ld-high { background: #22c55e; } .z-mhq-pie-slice--ld-high { fill: #22c55e; }

/* Page-level tab bar variant: no horizontal padding, tabs sized to their
   content (not stretched full-width like the modal tab bar). Sits above
   each bundle's content on the MHQ Insights page. */
.z-tabs.z-tabs--page {
    padding: 0;
    margin: 14px 0 20px;
    gap: 4px;
}
.z-tabs.z-tabs--page .z-tab {
    flex: 0 0 auto;
    padding: 10px 18px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px 8px 0 0;
}
.z-tabs.z-tabs--page .z-tab:hover:not(.is-active) {
    background: var(--z-bg-muted, #f1f5f9);
}

/* Top-level bundle heading — one per category (Wellbeing, Skills,
   Language & Communication, Career & Growth). Larger than the per-test
   sub-heading below so the hierarchy reads at a glance. */
.z-mhq-bundle-head {
    margin: 28px 0 10px;
    padding: 10px 14px;
    border-left: 4px solid var(--z-primary);
    background: var(--z-bg-muted, #f1f5f9);
    border-radius: 0 8px 8px 0;
}
.z-mhq-bundle-head:first-of-type { margin-top: 8px; }
.z-mhq-bundle-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--z-primary-dark);
    letter-spacing: .1px;
}

/* Per-test group: a titled wrapper around the two doughnut cards for a
   single test. Lifts the test label out of each card title and makes
   the pairing visually obvious. */
.z-mhq-test-group {
    margin: 18px 0 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--z-border);
}
.z-mhq-test-group-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.z-mhq-test-group-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--z-primary-dark);
    letter-spacing: .1px;
}
.z-mhq-test-group-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--z-text);
    background: var(--z-bg-muted, #f1f5f9);
    padding: 2px 8px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
/* The scored pill sits on the right; an optional "incomplete" pill
   stacks just left of it, styled in muted amber so analysts can see
   fallout without it competing with the primary count. */
.z-mhq-test-group-head .z-mhq-test-group-count + .z-mhq-test-group-count { margin-left: 6px; }
.z-mhq-test-group-count--incomplete {
    color: #92400e;
    background: #fef3c7;
}
/* Muted "N incomplete" chip inside the .z-kpi-sub line (bundle-level
   KPI tiles reuse this for the Scored-sessions tile). */
.z-kpi-sub-incomplete {
    color: #92400e;
    font-weight: 600;
}

/* Stacked monthly bar — one column per month, 6 segments stacked vertically.
   Each column reserves a fixed track height; the inner bar grows upward from
   the baseline proportionally to that month's share of the tallest month,
   and segments inside the bar are sized as % of the month's own total so
   they always sum to 100%. Total count sits ABOVE the bar (as a sibling, not
   inside, because the bar clips overflow to round the top corners). */
.z-mhq-stack {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    height: 240px;
    padding: 10px 6px 6px;
    border-bottom: 1px dashed var(--z-border);
}
.z-mhq-stack-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    height: 100%;
    min-width: 0;
}
.z-mhq-stack-col-total {
    font-size: 11px;
    font-weight: 700;
    color: var(--z-primary-dark);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    min-height: 14px;
}
.z-mhq-stack-col-total[data-empty] { color: var(--z-text-muted); font-weight: 500; }
.z-mhq-stack-col-inner {
    width: 100%;
    max-width: 44px;
    min-height: 2px;
    display: flex;
    flex-direction: column-reverse;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
    background: var(--z-primary-softer);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.z-mhq-stack-seg { width: 100%; transition: opacity .15s ease; min-height: 0; }
.z-mhq-stack-seg:hover { opacity: 0.8; }
.z-mhq-stack-seg--needs-support { background: #7f1d1d; }
.z-mhq-stack-seg--struggling    { background: #dc2626; }
.z-mhq-stack-seg--strained      { background: #ea580c; }
.z-mhq-stack-seg--coping        { background: #facc15; }
.z-mhq-stack-seg--steady        { background: #a3e635; }
.z-mhq-stack-seg--flourishing   { background: #22c55e; }
.z-mhq-stack-seg--thriving      { background: #3b82f6; }
.z-mhq-stack-col-label {
    font-size: 11px;
    color: var(--z-text-muted);
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

/* Score-range strip — a single horizontal bar split into the 6 bands. */
.z-mhq-range {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    margin: 6px 0 10px;
    border: 1px solid var(--z-border);
}
.z-mhq-range-seg { height: 100%; }
.z-mhq-range-labels {
    display: flex;
    font-size: 11px;
    color: var(--z-text-muted);
    font-variant-numeric: tabular-nums;
}
.z-mhq-range-labels span { flex: 1 1 0; text-align: center; }

/* MHQ dashboard: band distribution row — wider label column so "Struggling
   (-24..0)" fits without ellipsis. */
.z-mhq-dist-row { grid-template-columns: 170px 1fr 56px; }
/* Thicker bars just for the MHQ band-distribution card so the colour scale
   reads clearly from across the room, without affecting other dist lists. */
.z-mhq-dist-row .z-dist-bar { height: 22px; border-radius: 6px; }
.z-mhq-dist-row .z-dist-bar-fill { border-radius: 6px; }

/* Band-distribution card stretches to match the neighbouring Monthly-trend
   card: card itself becomes a flex column, the list consumes the leftover
   space, and its 7 rows distribute evenly so the chart fills the full card
   height instead of leaving a gap below the last row. */
.z-mhq-dist-card { display: flex; flex-direction: column; }
.z-mhq-dist-card .z-dist-list {
    flex: 1 1 auto;
    justify-content: space-between;
    gap: 0;
}

/* Per-band KPI tile: when the label sits BELOW the big % value (not above
   it, as the default `.z-kpi-label` assumes), slightly darker + larger so
   the band name reads as the primary caption, not a section header. */
.z-kpi-label--band {
    color: var(--z-text);
    font-size: 12px;
    margin-top: 2px;
    margin-bottom: 2px;
}
.z-mhq-dist-num-sub { font-size: 10.5px; font-weight: 500; color: var(--z-text-muted); margin-left: 4px; }

/* KPI tile background accents for the MHQ summary row (match the gradient
   style used by the other `.z-kpi-icon--*` modifiers so they read as a set). */
.z-kpi-icon--red   { background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%); }
.z-kpi-icon--green { background: linear-gradient(135deg, #15803d 0%, #22c55e 100%); }
.z-kpi-icon--blue  { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%); }

/* MHQ pie chart — pure SVG, viewBox 0 0 120 120, each slice is a filled
   <path> (Move-Line-Arc-Close). Slices start at 12 o'clock and go clockwise.
   Fonts are in SVG user units; with a 120-unit viewBox rendered at 220px,
   1 unit ≈ 1.83 display px. */
.z-mhq-pie-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 4px 0;
}
.z-mhq-pie {
    width: 264px;
    height: 264px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.1));
}
.z-mhq-pie-slice {
    stroke: #fff;
    stroke-width: 0.6;
    stroke-linejoin: round;
    transition: filter .15s ease;
}
.z-mhq-pie-slice:hover { filter: brightness(1.08); }
.z-mhq-pie-slice--needs-support { fill: #7f1d1d; }
.z-mhq-pie-slice--struggling    { fill: #dc2626; }
.z-mhq-pie-slice--strained      { fill: #ea580c; }
.z-mhq-pie-slice--coping        { fill: #facc15; }
.z-mhq-pie-slice--steady        { fill: #a3e635; }
.z-mhq-pie-slice--flourishing   { fill: #22c55e; }
.z-mhq-pie-slice--thriving      { fill: #3b82f6; }
.z-mhq-pie-hole {
    fill: var(--z-bg-panel);
    pointer-events: none;
}
.z-mhq-pie-pct {
    font-size: 5.5px;
    font-weight: 700;
    fill: #fff;
    text-anchor: middle;
    paint-order: stroke;
    stroke: rgba(15, 23, 42, 0.5);
    stroke-width: 0.4;
    pointer-events: none;
}
.z-mhq-pie-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.z-mhq-pie-legend-row {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--z-text);
}
.z-mhq-pie-legend-lbl {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.z-mhq-pie-legend-num {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--z-primary-dark);
    font-size: 12.5px;
}
@media (max-width: 560px) {
    .z-mhq-pie { width: 216px; height: 216px; }
    .z-mhq-pie-wrap { justify-content: center; }
}

.z-dist-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--z-primary-dark);
    font-size: 12.5px;
}
@media (max-width: 560px) {
    .z-dist-row { grid-template-columns: 1fr 36px; }
    .z-dist-bar { grid-column: 1 / -1; }
}

/* Compact table variant for recent sessions */
.z-admin-table--compact th, .z-admin-table--compact td {
    padding: 8px 10px;
    font-size: 13px;
}

/* Course progress mini-bar for admin/courses */
.z-course-progress {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 110px;
}
.z-course-progress-bar {
    flex: 1 1 auto;
    height: 6px;
    background: var(--z-primary-softer);
    border-radius: 999px;
    overflow: hidden;
}
.z-course-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0d9488 0%, #2dd4bf 100%);
    border-radius: 999px;
    min-width: 2px;
}
.z-course-progress-num {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--z-primary-dark);
    min-width: 32px;
    text-align: right;
}

/* Certificate quick-action links inside the enrollments table cell */
.z-cert-row-actions {
    margin-top: 3px;
    font-size: 11.5px;
    display: inline-flex;
    gap: 4px;
}
.z-cert-row-actions a {
    color: var(--z-primary);
    text-decoration: none;
    font-weight: 600;
}
.z-cert-row-actions a:hover { text-decoration: underline; }

/* Certificate preview page — admin heading row */
.z-dash-heading--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.z-cert-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.z-cert-actions-row--inline { margin-top: 14px; }

/* Top token users list */
.z-tt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.z-tt-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: var(--z-primary-softer);
    border-radius: 8px;
    font-size: 13px;
}
.z-tt-rank {
    font-size: 11px;
    font-weight: 700;
    color: var(--z-primary-dark);
    font-variant-numeric: tabular-nums;
}
.z-tt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-tt-tokens {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--z-text);
}

@media (max-width: 1000px) {
    .z-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .z-analytics-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .z-kpi-grid { grid-template-columns: 1fr; }
    .z-chart-bar { width: 5px; }
}
.z-segmented {
    display: inline-flex;
    background: #fff;
    border: 1px solid var(--z-border);
    border-radius: 10px;
    padding: 3px;
}
.z-segmented-item {
    position: relative;
    cursor: pointer;
}
.z-segmented-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.z-segmented-item > span {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--z-text-muted);
    border-radius: 7px;
    transition: background .15s ease, color .15s ease;
    user-select: none;
}
.z-segmented-item:hover > span { color: var(--z-text); }
.z-segmented-item.is-active > span {
    background: var(--z-primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(30, 42, 120, 0.25);
}

.z-filter-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--z-border);
}
.z-filter-chips-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--z-text-muted);
    margin-right: 2px;
}
.z-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 10px;
    background: #fff;
    border: 1px solid var(--z-border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--z-text);
    text-decoration: none;
    transition: all .15s ease;
}
.z-filter-chip:hover {
    border-color: var(--z-rose, #f43f5e);
    color: var(--z-rose, #f43f5e);
    background: #fef2f2;
}
.z-filter-chip-x {
    display: inline-grid;
    place-items: center;
    width: 16px; height: 16px;
    background: var(--z-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--z-text-muted);
    line-height: 1;
    transition: all .15s ease;
}
.z-filter-chip:hover .z-filter-chip-x {
    background: #f43f5e;
    color: #fff;
}

@media (max-width: 900px) {
    .z-filter-grid:not(.z-filter-grid-row) { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .z-filter-grid:not(.z-filter-grid-row) { grid-template-columns: 1fr; }
    .z-filter-panel-head { flex-direction: column; align-items: stretch; }
    .z-filter-head-actions { align-self: flex-end; }
}

/* ---- Admin table ---- */
.z-admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
}
.z-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.z-admin-table thead th {
    text-align: left;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--z-text-muted);
    padding: 12px 14px;
    background: #f7f8fc;
    border-bottom: 1px solid var(--z-border);
    white-space: nowrap;
}
.z-admin-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--z-border);
    color: var(--z-text);
    vertical-align: middle;
}
.z-admin-table tbody tr:last-child td { border-bottom: 0; }
.z-admin-table tbody tr:hover { background: #fafbff; }
.z-admin-empty-row { text-align: center; color: var(--z-text-muted); padding: 28px 14px !important; }
.z-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
td.z-admin-actions--icons {
    display: table-cell;
    white-space: nowrap;
    text-align: left;
}
td.z-admin-actions--icons > a,
td.z-admin-actions--icons > form,
td.z-admin-actions--icons .z-inline-form {
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px 0 0;
    padding: 0;
}
td.z-admin-actions--icons .z-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border-radius: var(--z-radius-sm, 6px);
    line-height: 1;
    vertical-align: middle;
}
td.z-admin-actions--icons .z-btn-icon > svg { display: block; }

/* Bundle label cell with auto-assigned icon */
.z-bundle-cell { display: flex; align-items: center; gap: 12px; }
.z-bundle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: var(--z-primary, #4f46e5);
    border: 1px solid #e3e8f5;
    border-radius: 10px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.08);
}
.z-bundle-icon > svg { display: block; width: 22px; height: 22px; }

/* Row of small bundle icons (e.g. tenants list → ZOE Bundles column) */
.z-bundle-icon-row { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.z-bundle-icon--sm { width: 28px; height: 28px; border-radius: 8px; cursor: help; }
.z-bundle-icon--sm > svg { width: 16px; height: 16px; }
.z-bundle-icon--sm:hover { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }

/* ---- Pills + progress bars ---- */
.z-admin-pill {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: var(--z-radius-pill);
    text-transform: capitalize;
}
.z-admin-pill-ok   { color: #0e7a3a; background: #e2f8ea; }
.z-admin-pill-warn { color: #8a5a00; background: #fdf2d8; }
.z-admin-pill-err  { color: #a52322; background: #fde3e3; }

.z-admin-progress {
    display: inline-block;
    width: 90px;
    height: 6px;
    background: var(--z-border);
    border-radius: var(--z-radius-pill);
    overflow: hidden;
    vertical-align: middle;
    margin-right: 8px;
}
.z-admin-progress-fill { height: 100%; background: var(--z-primary); border-radius: inherit; }
.z-admin-progress-num { font-size: 12px; color: var(--z-text-muted); }

/* ---- Stat grid (user detail header) ---- */
.z-admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.z-admin-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #f7f8fc;
    border-radius: var(--z-radius-md);
    border: 1px solid var(--z-border);
}
.z-admin-stat-label { font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--z-text-muted); }
.z-admin-stat-value { font-size: 20px; font-weight: 700; color: var(--z-text); }

/* ---- Pager ---- */
.z-admin-pager {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.z-admin-pager-link {
    display: inline-block;
    padding: 6px 11px;
    min-width: 32px;
    text-align: center;
    font-size: 13px;
    color: var(--z-text);
    background: #fff;
    border: 1px solid var(--z-border);
    border-radius: 8px;
    text-decoration: none;
}
.z-admin-pager-link:hover { border-color: var(--z-primary); color: var(--z-primary); }
.z-admin-pager-link.is-active { background: var(--z-primary); color: #fff; border-color: var(--z-primary); }
.z-admin-pager-link.is-disabled { color: var(--z-text-dim); background: #f7f8fc; cursor: default; }
.z-admin-pager-gap { padding: 6px 4px; color: var(--z-text-muted); }

/* ---- Transcript bubbles ---- */
.z-admin-transcript {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.z-admin-msg {
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    padding: 12px 14px;
    background: #fff;
}
.z-admin-msg-user   { background: var(--z-primary-softer); border-color: var(--z-primary-soft); }
.z-admin-msg-bot    { background: #fff; }
.z-admin-msg-system { background: #fafbff; border-style: dashed; }
.z-admin-msg-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    letter-spacing: 0.03em;
    color: var(--z-text-muted);
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.z-admin-msg-role { font-weight: 700; color: var(--z-text); text-transform: uppercase; letter-spacing: 0.08em; }
.z-admin-msg-phase { padding: 1px 7px; background: var(--z-border); border-radius: var(--z-radius-pill); }
.z-admin-msg-time { margin-left: auto; }
.z-admin-msg-body { font-size: 14px; line-height: 1.55; color: var(--z-text); white-space: normal; }

/* ---- Enrollment: chapters + lessons ---- */
.z-admin-chapter {
    padding: 14px 0;
    border-bottom: 1px solid var(--z-border);
}
.z-admin-chapter:last-child { border-bottom: 0; padding-bottom: 0; }
.z-admin-chapter:first-child { padding-top: 0; }
.z-admin-chapter-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.z-admin-chapter-num {
    display: inline-grid; place-items: center;
    width: 24px; height: 24px;
    font-size: 12px; font-weight: 700; color: #fff;
    background: var(--z-primary);
    border-radius: var(--z-radius-pill);
}
.z-admin-chapter-title { font-weight: 600; color: var(--z-text); }
.z-admin-lesson-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.z-admin-lesson {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f7f8fc;
    border: 1px solid var(--z-border);
    border-radius: 10px;
    font-size: 14px;
}
.z-admin-lesson.is-done { background: #e2f8ea; border-color: #c0ead0; }
.z-admin-lesson-check {
    display: inline-grid; place-items: center;
    width: 20px; height: 20px;
    border-radius: var(--z-radius-pill);
    font-size: 12px; font-weight: 700;
    background: var(--z-border);
    color: var(--z-text-muted);
}
.z-admin-lesson.is-done .z-admin-lesson-check { background: #0e7a3a; color: #fff; }
.z-admin-lesson-title { flex: 1 1 auto; }
.z-admin-lesson-dur { color: var(--z-text-muted); font-size: 12.5px; }
.z-admin-lesson-done-at { color: var(--z-text-muted); font-size: 12px; margin-left: 10px; }
.z-admin-sub-desc { color: var(--z-text-muted); margin: 14px 0 0; font-size: 14px; }

@media (max-width: 760px) {
    .z-admin-filterbar { flex-direction: column; align-items: stretch; }
    .z-admin-search { max-width: none; }
    .z-admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- My Tests catalog & result -------------------------------------- */

.z-dash-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--z-primary-softer);
    border-radius: var(--z-radius-lg);
}
.z-dash-callout p { margin: 0; color: var(--z-text-muted); font-size: 14px; }

.z-test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.z-test-tile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    box-shadow: var(--z-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.z-test-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--z-shadow-md);
    border-color: var(--z-border-strong);
}
.z-test-tile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.z-test-tile-title {
    margin: 0;
    font-family: var(--z-font-serif);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.z-test-tile-score {
    font-family: var(--z-font-serif);
    font-weight: 700;
    font-size: 22px;
    color: var(--z-primary);
    white-space: nowrap;
}
.z-test-tile-score-denom {
    color: var(--z-text-muted);
    font-weight: 500;
    font-size: 13px;
}
.z-test-tile-sub {
    margin: 0;
    color: var(--z-text-muted);
    font-size: 13.5px;
    line-height: 1.5;
}
.z-test-tile-headline {
    padding: 10px 12px;
    background: #f7f8fc;
    border: 1px solid var(--z-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.z-test-tile-headline.is-empty { color: var(--z-text-muted); font-style: italic; }
.z-test-tile-headline-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--z-text-muted);
}
.z-test-tile-headline-value {
    font-size: 14.5px;
    color: #1a1f2e;
    font-weight: 500;
}
.z-test-tile-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--z-text-muted);
    flex-wrap: wrap;
}
.z-test-tile-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #e5e9f2;
    color: var(--z-text-muted);
}
.z-test-tile-badge.is-primary { background: var(--z-primary-soft); color: var(--z-primary-dark); }
.z-test-tile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}
.z-test-tile-actions .z-btn-primary {
    flex: 1 1 100%;
    min-width: 0;
    padding: 8px 14px;
    font-size: 13px;
    white-space: normal;
    text-align: center;
    text-wrap: balance;
    line-height: 1.25;
    border-radius: 14px;
}

.z-test-result-head {
    display: flex;
    gap: 20px;
    align-items: center;
}
.z-test-result-score {
    font-family: var(--z-font-serif);
    font-weight: 700;
    font-size: 48px;
    color: var(--z-primary);
    line-height: 1;
    flex-shrink: 0;
}
.z-test-result-score-denom {
    color: var(--z-text-muted);
    font-weight: 500;
    font-size: 16px;
}
.z-test-result-body { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.z-test-result-headline {
    margin: 0;
    font-family: var(--z-font-serif);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.z-test-result-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 560px) {
    .z-test-result-head { flex-direction: column; align-items: flex-start; }
    .z-test-result-score { font-size: 40px; }
}

/* ---- Multi-passage Accent Test ------------------------------------- */
.z-accent-stepper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.z-accent-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-pill);
    font-size: 12px;
    color: var(--z-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .18s, border-color .18s, color .18s;
}
.z-accent-step-num {
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--z-border);
    color: var(--z-text-muted);
    font-weight: 700;
    font-size: 11px;
}
.z-accent-step.is-active {
    border-color: var(--z-primary);
    background: var(--z-primary-softer);
    color: var(--z-primary-dark);
}
.z-accent-step.is-active .z-accent-step-num {
    background: var(--z-primary);
    color: #fff;
}
.z-accent-step.is-done {
    border-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
}
.z-accent-step.is-done .z-accent-step-num {
    background: #10b981;
    color: #fff;
}
.z-accent-step.is-done .z-accent-step-num::before {
    content: '✓';
    font-size: 12px;
}
.z-accent-step.is-done .z-accent-step-num > span { display: none; }

.z-accent-metrics {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 10px 0 12px;
}
.z-accent-progress-note {
    margin-top: 14px;
    font-size: 12px;
    color: var(--z-text-muted);
    font-style: italic;
}

/* Final analyse panel */
.z-accent-final { margin-top: 20px; }

/* ---- Accent result page -------------------------------------------- */
.z-accent-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.z-accent-hero-variant {
    font-family: var(--z-font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--z-text);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}
.z-accent-hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.z-accent-hero-score {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 14px 20px;
    background: linear-gradient(140deg, var(--z-primary-dark), var(--z-primary));
    color: #fff;
    border-radius: var(--z-radius-md);
    position: relative;
}
.z-accent-hero-score-num {
    font-family: var(--z-font-serif);
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}
.z-accent-hero-score-denom { font-size: 14px; opacity: 0.75; }
.z-accent-hero-score-label {
    position: absolute;
    bottom: 4px; left: 20px;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.75;
}

.z-accent-pp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.z-accent-pp-card {
    padding: 14px 16px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
}
.z-accent-pp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--z-border);
}
.z-accent-pp-title { font-weight: 700; font-size: 13px; }
.z-accent-pp-score {
    font-family: var(--z-font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--z-primary);
    line-height: 1;
}
.z-accent-pp-metrics {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--z-text-muted);
    margin-bottom: 8px;
}
.z-accent-pp-metrics strong { color: var(--z-text); font-weight: 700; }
.z-accent-pp-note {
    margin: 0;
    font-size: 12px;
    color: var(--z-text);
    line-height: 1.4;
}

.z-accent-phoneme-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.z-accent-phoneme {
    display: grid;
    grid-template-columns: 56px 1fr 76px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-left: 4px solid var(--z-border);
    border-radius: var(--z-radius-md);
    font-size: 13px;
}
.z-accent-phoneme.is-low    { border-left-color: #10b981; }
.z-accent-phoneme.is-medium { border-left-color: #f59e0b; }
.z-accent-phoneme.is-high   { border-left-color: #ef4444; }
.z-accent-phoneme-sound {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--z-primary);
    text-align: center;
}
.z-accent-phoneme-body {
    color: var(--z-text);
    line-height: 1.4;
}
.z-accent-phoneme-sev {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: right;
    color: var(--z-text-muted);
}
.z-accent-phoneme.is-low    .z-accent-phoneme-sev { color: #065f46; }
.z-accent-phoneme.is-medium .z-accent-phoneme-sev { color: #92400e; }
.z-accent-phoneme.is-high   .z-accent-phoneme-sev { color: #991b1b; }

@media (max-width: 560px) {
    .z-accent-hero { flex-direction: column; align-items: flex-start; }
    .z-accent-phoneme { grid-template-columns: 44px 1fr; }
    .z-accent-phoneme-sev { grid-column: 2; text-align: left; margin-top: 4px; }
}

/* ---- MHQ duration chooser ------------------------------------------ */
.z-mhq-choose-intro { margin-bottom: 18px; }
.z-mhq-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.z-mhq-choose-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px 18px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    box-shadow: var(--z-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform .18s var(--z-ease), box-shadow .18s var(--z-ease), border-color .18s var(--z-ease);
}
.z-mhq-choose-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--z-shadow-md);
    border-color: var(--z-primary-soft);
    text-decoration: none;
    color: inherit;
}
.z-mhq-choose-card-head {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: var(--z-primary);
}
.z-mhq-choose-mins {
    font-family: var(--z-font-serif);
    font-weight: 700;
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.02em;
}
.z-mhq-choose-mins-unit {
    font-size: 14px;
    font-weight: 600;
    color: var(--z-text-muted);
    letter-spacing: 0.02em;
}
.z-mhq-choose-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--z-text);
}
.z-mhq-choose-sub {
    font-size: 13px;
    color: var(--z-text-muted);
    margin-top: 2px;
}
.z-mhq-choose-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 11px;
    color: var(--z-text-dim);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.z-mhq-choose-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-weight: 700;
    font-size: 13px;
    color: var(--z-primary);
}
.z-mhq-choose-disclaimer {
    margin-top: 24px;
    padding: 14px 18px;
    background: #fff8e1;
    border: 1px solid #fde68a;
    border-radius: var(--z-radius-md);
    color: #713f12;
    font-size: 13px;
    line-height: 1.5;
}

/* ---- MHQ 47-facet result grid -------------------------------------- */
.z-mhq-fac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.z-mhq-fac-dim {
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    padding: 16px 18px;
}
.z-mhq-fac-dim-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--z-border);
}
.z-mhq-fac-dim-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--z-text);
}
.z-mhq-fac-dim-score {
    font-family: var(--z-font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--z-primary);
    line-height: 1;
}
.z-mhq-fac-row {
    display: grid;
    grid-template-columns: 1fr 70px 36px;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 12px;
}
.z-mhq-fac-row + .z-mhq-fac-row { border-top: 1px dotted rgba(15,23,36,0.06); }
.z-mhq-fac-name {
    font-weight: 500;
    color: var(--z-text);
    text-transform: capitalize;
}
.z-mhq-fac-bar {
    height: 6px;
    background: rgba(15,23,36,0.08);
    border-radius: var(--z-radius-pill);
    overflow: hidden;
}
.z-mhq-fac-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--z-primary), var(--z-primary-light));
    border-radius: inherit;
    transition: width .4s var(--z-ease);
}
.z-mhq-fac-num {
    text-align: right;
    font-weight: 700;
    color: var(--z-text);
    font-variant-numeric: tabular-nums;
}
.z-mhq-fac-row.is-lowconf { opacity: 0.55; }
.z-mhq-fac-row.is-lowconf .z-mhq-fac-name::after {
    content: " · not probed";
    color: var(--z-text-dim);
    font-weight: 400;
    font-size: 10px;
}

/* ---- MHQ-specific sections ----------------------------------------- */
.z-mhq-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.z-mhq-list {
    background: #f7f8fc;
    border: 1px solid var(--z-border);
    border-radius: 12px;
    padding: 12px 14px;
}
.z-mhq-list-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--z-text-muted);
    margin-bottom: 6px;
}
.z-mhq-list ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13.5px;
    line-height: 1.55;
}
.z-mhq-support {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff5e6;
    border: 1px solid #f0c893;
    color: #7a4b00;
    font-size: 13.5px;
    line-height: 1.5;
}
.z-mhq-disclaimer {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--z-text-muted);
    font-style: italic;
}
.z-mhq-dims { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.z-mhq-dim {
    padding: 10px 12px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: 10px;
}
.z-mhq-dim-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) 2fr 40px auto;
    align-items: center;
    gap: 10px;
}
.z-mhq-dim-label { font-size: 13.5px; font-weight: 600; color: #1a1f2e; }
.z-mhq-dim-bar { height: 8px; background: var(--z-primary-softer); border-radius: 999px; overflow: hidden; }
.z-mhq-dim-bar-fill { height: 100%; background: linear-gradient(90deg, var(--z-primary) 0%, var(--z-primary-light) 100%); border-radius: 999px; }
.z-mhq-dim-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--z-primary-dark); font-size: 13.5px; }
.z-mhq-dim-conf {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e5e9f2;
    color: var(--z-text-muted);
    white-space: nowrap;
}
.z-mhq-dim-conf.is-high   { background: #d1fae5; color: #065f46; }
.z-mhq-dim-conf.is-medium { background: #fef3c7; color: #92400e; }
.z-mhq-dim-conf.is-low    { background: #fee2e2; color: #991b1b; }
.z-mhq-dim-evidence {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--z-text-muted);
    line-height: 1.5;
    font-style: italic;
}
.z-mhq-method {
    margin: 14px 0 0;
    padding: 10px 12px;
    background: #f7f8fc;
    border: 1px solid var(--z-border);
    border-radius: 10px;
    font-size: 12.5px;
    color: var(--z-text-muted);
    line-height: 1.5;
}
.z-mhq-method strong { color: #1a1f2e; }
@media (max-width: 560px) {
    .z-mhq-dim-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
    .z-mhq-dim-bar { grid-column: 1 / -1; }
}

/* Stacked heading variant — children flow top-down instead of spreading
   across the row. Used on edit pages where a CTA sits above the back link. */
.z-dash-heading--stack {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Stacked CTA sitting above the "← back" link on edit pages. */
.z-admin-stacked-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    align-self: flex-start;
}

/* ---- Admin: edit / create form card ---- */
.z-admin-form-card { max-width: 640px; }
/* Wide variant: fills the full content column — no max cap. Strip the base
   .z-dash-card padding and hover lift so the form body owns its own spacing. */
.z-admin-form-card--wide {
    max-width: none;
    width: 100%;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}
.z-admin-form-card--wide:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(15,23,36,0.05);
}
.z-admin-form-body { padding: 24px; }
.z-admin-form-body--roomy { padding: 22px 28px; }

/* Tightness overrides scoped to the wide admin form only — keep the login
   form, chat input etc. at their default sizes. */
.z-admin-form-card--wide .z-input,
.z-admin-form-card--wide select.z-input {
    padding: 8px 12px;
    font-size: 13.5px;
}
.z-admin-form-card--wide textarea.z-input { padding: 8px 12px; }
.z-admin-form-card--wide .z-form-row { margin-bottom: 10px; gap: 5px; }
.z-admin-form-card--wide .z-perm-item { padding: 8px 10px; }
.z-admin-form-card--wide .z-perm-item-label { font-size: 13px; }
.z-admin-form-card--wide .z-form-section { margin-top: 16px; padding-top: 14px; }
.z-admin-form-card--wide .z-form-section:first-of-type { margin-top: 2px; }
.z-admin-form-card--wide .z-form-section-title { margin-bottom: 10px; }
.z-admin-form-card--wide .z-form-actions { margin-top: 14px; padding-top: 14px; }
.z-admin-form-error { margin: 12px 0; }
.z-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--z-border);
}

/* ---- Admin: grouped form sections ---- */
.z-form-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--z-border);
}
.z-form-section:first-of-type {
    margin-top: 4px;
    padding-top: 0;
    border-top: 0;
}
.z-form-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}
.z-form-section-title h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--z-text);
    margin: 0;
}
.z-form-section-title .z-help {
    margin: 0;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* 2-column grid for form rows that pair naturally. Collapses to 1 col ≤720px.
   align-items:start keeps each row anchored to the top of the grid cell, and
   the label's min-height ensures a cell with no secondary note aligns its
   input with a sibling whose label would otherwise be taller — so paired
   inputs always sit on the same baseline regardless of per-row content. */
.z-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
    align-items: start;
}
.z-form-grid-2 .z-form-row { margin-bottom: 0; }
.z-form-grid-2 .z-form-row > .z-label { min-height: 18px; line-height: 1.3; }
.z-form-grid-2 > .z-form-row--full { grid-column: 1 / -1; }
.z-form-grid-2 .z-input,
.z-form-grid-2 select.z-input { width: 100%; max-width: 100%; }
@media (max-width: 720px) {
    .z-form-grid-2 { grid-template-columns: 1fr; }
}

/* 3-column grid sibling for time/difficulty/complexity-style rows. */
.z-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 28px;
    margin-top: 18px;
}
.z-form-grid-3 .z-form-row { margin-bottom: 0; }
.z-form-grid-3 .z-input,
.z-form-grid-3 select.z-input { width: 100%; max-width: 100%; }
@media (max-width: 860px) {
    .z-form-grid-3 { grid-template-columns: 1fr; }
}

/* ZOE Tests page (admin/zoe-tests) — reuses the admin/surveys .z-filter-panel +
   admin/token-logs-overview .z-admin-table pattern. Only extras are the wider
   modal panel, difficulty pills, row-action spacing, and a danger ghost button. */
.z-modal-panel--wide { max-width: 640px; }
.z-modal-body { padding: 18px 28px 6px; }
.z-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 28px 22px;
    border-top: 1px solid var(--z-border, #e3e6ef);
    margin-top: 10px;
}
.z-admin-row-actions { white-space: nowrap; }
.z-admin-row-actions .z-btn + .z-btn,
.z-admin-row-actions form + .z-btn,
.z-admin-row-actions .z-btn + form { margin-left: 6px; }

.z-ztest-badge {
    display: inline-flex; align-items: center;
    padding: 3px 9px;
    font-size: 11px; font-weight: 600;
    border-radius: 999px;
    background: #eef1fa;
    color: var(--z-text, #0f1724);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.z-ztest-badge--easy   { background: #e3f6ea; color: #1f7a3a; }
.z-ztest-badge--normal { background: #e7ecfb; color: #35469b; }
.z-ztest-badge--hard   { background: #fde4e4; color: #a3202c; }
.z-ztest-badge--muted  { background: #f3f4fa; color: #5b6478; }

.z-btn-danger { color: #a3202c; }
.z-btn-danger:hover { background: #fde4e4; color: #a3202c; }

/* ----- Add ZOE Test dialog ----- */
.z-ztest-dialog {
    width: calc(100vw - 48px);
    max-width: 920px;
    max-height: calc(100vh - 64px);
    display: flex; flex-direction: column;
    padding: 0;
    overflow: hidden;
}
/* The <form> wraps the body + footer, so it needs to be the flex child
   that grows and the inner flex container that lets the body scroll. */
.z-ztest-dialog .z-ztest-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.z-ztest-dialog-header {
    padding: 20px 28px 16px;
    border-bottom: 1px solid var(--z-border, #e3e6ef);
    flex: 0 0 auto;
}
.z-ztest-dialog-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--z-text, #0f1724);
}
.z-ztest-dialog-sub {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--z-text-muted, #5b6478);
}
.z-ztest-dialog-body {
    padding: 20px 28px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}
.z-ztest-dialog-footer {
    padding: 14px 28px;
    display: flex; justify-content: flex-end; gap: 10px;
    border-top: 1px solid var(--z-border, #e3e6ef);
    background: #fbfbfd;
    flex: 0 0 auto;
}

.z-ztest-dialog-body > .z-ztest-field + .z-ztest-field,
.z-ztest-dialog-body > .z-ztest-field + .z-ztest-grid-2,
.z-ztest-dialog-body > .z-ztest-grid-2 + .z-ztest-field,
.z-ztest-dialog-body > .z-ztest-grid-2 + .z-ztest-grid-2 { margin-top: 16px; }
.z-ztest-divider {
    border: 0;
    border-top: 1px solid var(--z-border, #e3e6ef);
    margin: 20px 0;
}

.z-ztest-field-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.z-ztest-field-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--z-text, #0f1724);
    margin-bottom: 6px;
}
.z-ztest-field-head .z-ztest-field-label { margin-bottom: 0; }
.z-ztest-field-hint {
    display: block;
    font-size: 11.5px;
    color: var(--z-text-muted, #5b6478);
    margin-top: 6px;
    font-weight: 400;
}
.z-ztest-field-head .z-ztest-field-hint { margin-top: 0; }
.z-ztest-field-value {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--z-primary, #4150e0);
    font-variant-numeric: tabular-nums;
}

.z-ztest-dialog .z-input {
    width: 100%;
    max-width: 100%;
}

.z-ztest-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.z-ztest-grid-2 > .z-ztest-field { margin-top: 0; }

/* Multi-select age-group chip grid */
.z-ztest-chipgrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 760px) {
    .z-ztest-chipgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.z-ztest-chipgrid-item {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    user-select: none;
}
.z-ztest-chipgrid-item input[type="checkbox"] {
    position: absolute; opacity: 0; pointer-events: none;
}
.z-ztest-chipgrid-label {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--z-border, #e3e6ef);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--z-text, #0f1724);
    background: #fff;
    text-align: center;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.z-ztest-chipgrid-item:hover .z-ztest-chipgrid-label {
    border-color: #c8d1f3;
    background: #fafbff;
}
.z-ztest-chipgrid-item input[type="checkbox"]:checked + .z-ztest-chipgrid-label {
    border-color: var(--z-primary, #4150e0);
    background: var(--z-primary, #4150e0);
    color: #fff;
}
.z-ztest-chipgrid-item input[type="checkbox"]:focus-visible + .z-ztest-chipgrid-label {
    outline: 2px solid var(--z-primary, #4150e0);
    outline-offset: 2px;
}
.z-ztest-chipgrid-item input[type="checkbox"]:disabled + .z-ztest-chipgrid-label {
    opacity: 0.5; cursor: not-allowed;
}

/* Segmented control (radio groups) */
.z-ztest-segmented {
    display: inline-flex;
    width: 100%;
    border: 1px solid var(--z-border, #e3e6ef);
    border-radius: 8px;
    padding: 3px;
    background: #f6f8ff;
}
.z-ztest-segmented input[type="radio"] {
    position: absolute; opacity: 0; pointer-events: none;
}
.z-ztest-segmented label {
    flex: 1 1 0;
    text-align: center;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--z-text-muted, #5b6478);
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.z-ztest-segmented input[type="radio"]:checked + label {
    background: var(--z-primary, #4150e0);
    color: #fff;
    box-shadow: 0 1px 2px rgba(23, 32, 72, 0.12);
    font-weight: 600;
}
.z-ztest-segmented input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--z-primary, #4150e0);
    outline-offset: 2px;
}

/* Difficulty variant — the selected segment uses a difficulty-coded fill. */
.z-ztest-segmented--diff input[value="easy"]:checked + label   { background: #1f7a3a; color: #fff; }
.z-ztest-segmented--diff input[value="normal"]:checked + label { background: #35469b; color: #fff; }
.z-ztest-segmented--diff input[value="hard"]:checked + label   { background: #a3202c; color: #fff; }

/* Numeric stepper (time + buffer) */
.z-ztest-stepper {
    display: inline-flex; align-items: stretch;
    border: 1px solid var(--z-border, #e3e6ef);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    width: fit-content;
}
.z-ztest-stepper-btn {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: #fff; cursor: pointer;
    font-size: 18px; font-weight: 400; line-height: 1;
    color: var(--z-text-muted, #5b6478);
    transition: background .15s ease, color .15s ease;
}
.z-ztest-stepper-btn:hover {
    background: #f3f4fa;
    color: var(--z-primary, #4150e0);
}
.z-ztest-stepper-input {
    width: 72px; height: 40px;
    border: 0;
    border-left: 1px solid var(--z-border, #e3e6ef);
    border-right: 1px solid var(--z-border, #e3e6ef);
    border-radius: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: #fff;
    color: var(--z-text, #0f1724);
}
.z-ztest-stepper-input:focus {
    outline: 0;
    background: #fafbff;
}
.z-ztest-stepper-input::-webkit-outer-spin-button,
.z-ztest-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
.z-ztest-stepper-input { -moz-appearance: textfield; }

/* ----- Time options repeater ----- */
.z-ztest-time-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}
.z-ztest-time-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: end;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--z-border, #e3e6ef);
    border-radius: 10px;
    background: #fbfbfd;
}
.z-ztest-time-row .z-ztest-stepper { margin-top: 0; }
.z-ztest-time-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.z-ztest-time-field--combined { align-items: flex-start; }
.z-ztest-time-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--z-text-muted, #5b6478);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.z-ztest-time-combined {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--z-border, #e3e6ef);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--z-primary, #4150e0);
    font-variant-numeric: tabular-nums;
    height: 40px;
}
.z-ztest-time-remove {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--z-text-muted, #5b6478);
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}
.z-ztest-time-remove:hover {
    background: #fde4e4;
    color: #a3202c;
}
.z-ztest-time-add,
.z-ztest-agerange-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    background: var(--z-primary, #4150e0);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(23, 32, 72, 0.12);
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}
.z-ztest-time-add:hover,
.z-ztest-agerange-add:hover {
    background: #3645c8;
    box-shadow: 0 2px 6px rgba(65, 80, 224, 0.22);
}
.z-ztest-time-add {
    margin: 16px 0 24px;
}
@media (max-width: 600px) {
    .z-ztest-time-row {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    .z-ztest-time-field--combined {
        grid-column: 1 / -1;
    }
    .z-ztest-time-remove {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

/* --- Time options rendered as pill buttons --- */
.z-ztest-time-rows--pills {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.z-ztest-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 4px;
    border: 1px solid var(--z-border, #e3e6ef);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
    transition: border-color .15s ease, box-shadow .15s ease;
    height: 36px;
}
.z-ztest-time-pill:hover,
.z-ztest-time-pill:focus-within {
    border-color: var(--z-primary, #4150e0);
    box-shadow: 0 2px 6px rgba(65, 80, 224, 0.12);
}
.z-ztest-time-pill-main,
.z-ztest-time-pill-buffer {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.z-ztest-pill-step {
    width: 22px;
    height: 22px;
    border: 1px solid var(--z-border, #e3e6ef);
    background: #f8f9fc;
    border-radius: 50%;
    color: var(--z-text, #1b2033);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease, border-color .15s ease;
    flex: 0 0 auto;
}
.z-ztest-pill-step:hover {
    background: #eef0f8;
    border-color: #c7cce0;
}
.z-ztest-pill-step--sm {
    width: 18px;
    height: 18px;
    font-size: 11px;
    border-color: transparent;
    background: transparent;
}
.z-ztest-pill-step--sm:hover {
    background: #eef0f8;
    border-color: #c7cce0;
}
.z-ztest-pill-input {
    width: 36px;
    height: 22px;
    text-align: center;
    border: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: var(--z-primary, #4150e0);
    font-variant-numeric: tabular-nums;
    padding: 0;
    outline: none;
}
.z-ztest-pill-input--sm {
    width: 24px;
    font-weight: 600;
    font-size: 12px;
    color: var(--z-text-muted, #5b6478);
}
.z-ztest-pill-input::-webkit-outer-spin-button,
.z-ztest-pill-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.z-ztest-pill-input { -moz-appearance: textfield; }
.z-ztest-pill-unit {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--z-text-muted, #5b6478);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 2px;
}
.z-ztest-pill-sep {
    color: #d4d8e6;
    font-weight: 700;
    margin: 0 2px;
}
.z-ztest-pill-tag {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--z-text-muted, #5b6478);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 999px;
    background: #f3f4fa;
}
.z-ztest-pill-remove {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--z-text-muted, #5b6478);
    cursor: pointer;
    border-radius: 50%;
    margin-left: 2px;
    padding: 0;
    transition: background .15s ease, color .15s ease;
    flex: 0 0 auto;
}
.z-ztest-pill-remove:hover {
    background: #fde4e4;
    color: #a3202c;
}
.z-ztest-pill-combined { display: none; }

/* --- ZOE Bundles — tenant-admin card grid --- */
.z-bundle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin-top: 4px;
}
.z-bundle-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 20px 18px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--z-border, #e3e6ef);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.z-bundle-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--bundle-accent, #4150e0);
}
.z-bundle-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--bundle-tint, #eef2ff);
    opacity: 0.6;
    z-index: 0;
}
.z-bundle-card > * { position: relative; z-index: 1; }
.z-bundle-card:hover {
    transform: translateY(-2px);
    border-color: var(--bundle-accent-soft, rgba(65, 80, 224, 0.18));
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

.z-bundle-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.z-bundle-card-badge {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bundle-tint, #eef2ff);
    color: var(--bundle-accent, #4150e0);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 0 0 1px var(--bundle-accent-soft, rgba(65, 80, 224, 0.18));
}
.z-bundle-card-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.z-bundle-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--z-text, #0f1724);
    line-height: 1.25;
    word-break: break-word;
}
.z-bundle-card-slug {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--z-text-muted, #5b6478);
}
.z-bundle-card-diff {
    flex: 0 0 auto;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3f4fa;
    color: #5b6478;
}
.z-bundle-card-diff--easy   { background: #e3f6ea; color: #1f7a3a; }
.z-bundle-card-diff--normal { background: #e7ecfb; color: #35469b; }
.z-bundle-card-diff--hard   { background: #fde4e4; color: #a3202c; }

.z-bundle-card-blurb {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--z-text-muted, #5b6478);
}

.z-bundle-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bundle-tint, #eef2ff);
    color: var(--bundle-accent, #4150e0);
}
.z-bundle-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
}
.z-bundle-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--bundle-accent, #4150e0);
}
.z-bundle-stat-value {
    font-weight: 700;
    color: var(--z-text, #0f1724);
    font-variant-numeric: tabular-nums;
}
.z-bundle-stat-label {
    font-weight: 500;
    color: var(--z-text-muted, #5b6478);
}

.z-bundle-card-tests {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.z-bundle-test-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--bundle-accent, #4150e0);
    background: #fff;
    border: 1px solid var(--bundle-accent-soft, rgba(65, 80, 224, 0.18));
}
@media (max-width: 600px) {
    .z-bundle-card { padding: 18px 16px 16px; }
    .z-bundle-card-badge { width: 36px; height: 36px; flex-basis: 36px; font-size: 16px; }
}

/* Admin dashboard — student-login + QR widget */
.z-student-login-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.z-student-login-qr-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--z-border, #e3e6ef);
    background: #fff;
    color: var(--z-text, #0f1724);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: background .15s ease, border-color .15s ease;
}
.z-student-login-qr-btn:hover {
    background: #f6f8ff;
    border-color: var(--z-primary, #4150e0);
    color: var(--z-primary, #4150e0);
}
/* Centered modal overlay for the student-login QR */
.z-qr-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.z-qr-overlay[hidden] { display: none; }
.z-qr-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(2px);
    cursor: pointer;
}
.z-qr-overlay-panel {
    position: relative;
    width: 100%;
    max-width: 340px;
    padding: 20px 20px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(16, 24, 40, 0.28);
    z-index: 1;
}
.z-no-scroll { overflow: hidden; }

/* --- Tenant analytics (admin/tenant-view) --- */
.z-tenant-view-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.z-tenant-view-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: #f4f5fb;
    border: 1px solid var(--z-border, #e3e6ef);
}
.z-tenant-view-logo--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--z-primary, #4150e0);
    background: #eef2ff;
}
.z-tenant-view-actions { display: inline-flex; gap: 8px; align-items: center; }

.z-dash-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}
@media (max-width: 900px) {
    .z-dash-grid-2 { grid-template-columns: 1fr; }
}
.z-dash-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.z-admin-link-small { font-size: 12px; color: var(--z-primary, #4150e0); text-decoration: none; }
.z-admin-link-small:hover { text-decoration: underline; }

.z-activity-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 160px;
    padding: 6px 0 0;
}
.z-activity-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}
.z-activity-bar {
    position: relative;
    width: 100%;
    max-width: 24px;
    background: #e7ecfb;
    border-radius: 6px 6px 2px 2px;
    overflow: hidden;
    min-height: 2px;
}
.z-activity-bar-completed {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: var(--z-primary, #4150e0);
}
.z-activity-label {
    font-size: 10.5px;
    color: var(--z-text-muted, #5b6478);
    font-variant-numeric: tabular-nums;
}
.z-activity-legend {
    display: flex; gap: 14px; margin-top: 10px;
    font-size: 11.5px; color: var(--z-text-muted, #5b6478);
}
.z-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.z-swatch--completed  { background: var(--z-primary, #4150e0); }
.z-swatch--inprogress { background: #e7ecfb; }

.z-bucket-chart { display: flex; flex-direction: column; gap: 8px; }
.z-bucket-row {
    display: grid;
    grid-template-columns: 60px 1fr 36px;
    align-items: center;
    gap: 10px;
}
.z-bucket-label {
    font-size: 12px;
    color: var(--z-text-muted, #5b6478);
    font-variant-numeric: tabular-nums;
}
.z-bucket-track {
    height: 10px;
    background: #f3f4fa;
    border-radius: 999px;
    overflow: hidden;
}
.z-bucket-fill {
    height: 100%;
    background: var(--z-primary, #4150e0);
    border-radius: 999px;
}
.z-bucket-count { font-size: 12px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.z-admin-table--compact td,
.z-admin-table--compact th { padding: 8px 10px; font-size: 12.5px; }

.z-tenant-bundle-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.z-tenant-bundle-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--chip-accent, #4150e0) 25%, #e3e6ef);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: transform .15s ease, box-shadow .15s ease;
}
.z-tenant-bundle-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 24, 40, 0.08);
}
.z-tenant-bundle-chip-badge {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--chip-accent, #4150e0) 15%, #fff);
    color: var(--chip-accent, #4150e0);
    font-size: 11px;
    font-weight: 700;
}
.z-tenant-bundle-chip-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--z-text, #0f1724);
}
.z-tenant-bundle-chip-count {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--chip-accent, #4150e0);
    text-transform: uppercase;
}
.z-student-login-qr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.z-student-login-qr-head strong {
    font-size: 12.5px;
    color: var(--z-text, #0f1724);
}
.z-student-login-qr-close {
    border: 0;
    background: transparent;
    color: var(--z-text-muted, #5b6478);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.z-student-login-qr-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--z-border, #e3e6ef);
    padding: 8px;
}
.z-student-login-qr-url {
    margin-top: 8px;
    font-size: 11px;
    color: var(--z-text-muted, #5b6478);
    word-break: break-all;
    text-align: center;
}

/* --- Custom age range picker --- */
.z-ztest-agerange {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px dashed var(--z-border, #e3e6ef);
    border-radius: 10px;
    background: #fbfbfd;
}
.z-ztest-agerange-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--z-text-muted, #5b6478);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.z-ztest-agerange-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
.z-ztest-agerange-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.z-ztest-agerange-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--z-text-muted, #5b6478);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.z-ztest-agerange-input {
    width: 92px;
    padding: 6px 8px;
    border: 1px solid var(--z-border, #e3e6ef);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.z-ztest-agerange-input:focus {
    border-color: var(--z-primary, #4150e0);
    box-shadow: 0 0 0 3px rgba(65, 80, 224, 0.15);
}
.z-ztest-agerange-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #a3202c;
}
/* Alignment-only tweak kept out of the shared button rule above. */
.z-ztest-agerange-row .z-ztest-agerange-add { align-self: flex-end; }
.z-ztest-chipgrid-item--custom { position: relative; }
.z-ztest-chipgrid-inner {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    cursor: pointer;
}
.z-ztest-chipgrid-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #a3202c;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.08);
}
.z-ztest-chipgrid-item--custom .z-ztest-chipgrid-inner input[type="checkbox"]:checked + .z-ztest-chipgrid-label ~ .z-ztest-chipgrid-remove,
.z-ztest-chipgrid-item--custom .z-ztest-chipgrid-remove {
    /* kept visible against both unchecked (white chip) and checked (blue) states */
}
.z-ztest-chipgrid-remove:hover {
    background: #fde4e4;
    color: #7a1821;
}

.z-ztest-range {
    width: 100%;
    accent-color: var(--z-primary, #4150e0);
    height: 4px;
    margin-top: 2px;
}
.z-ztest-range-ticks {
    display: flex; justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    color: var(--z-text-muted, #5b6478);
}

.z-ztest-bundle-preview {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    margin-top: 10px;
    padding: 10px 12px;
    background: #f6f8ff;
    border-radius: 8px;
    border: 1px solid var(--z-border, #e3e6ef);
    font-size: 12px;
    color: var(--z-text, #0f1724);
}
.z-ztest-bundle-preview-label {
    font-size: 10.5px;
    color: var(--z-text-muted, #5b6478);
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.z-ztest-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-top: 20px;
    padding: 14px 18px;
    background: #0f1724;
    border-radius: 8px;
    color: #fff;
}
.z-ztest-summary-label {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.z-ztest-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.z-ztest-pill--class {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    font-size: 11.5px; font-weight: 600;
    border-radius: 6px;
    background: #f3f4fa;
    color: var(--z-text, #0f1724);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .z-ztest-grid-2 { grid-template-columns: 1fr; }
    .z-ztest-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
    .z-ztest-dialog-header,
    .z-ztest-dialog-body,
    .z-ztest-dialog-footer { padding-left: 18px; padding-right: 18px; }
}

/* On wide screens, let the test-selection checkbox grid breathe into 3 cols. */
.z-perm-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) {
    .z-perm-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .z-perm-grid--three { grid-template-columns: 1fr; }
}

/* ---- Admin: card header row ---- */
.z-admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.z-admin-card-head .z-admin-card-title { margin: 0; }

/* ---- Admin permission checkbox grid ---- */
.z-perm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin-top: 4px;
}
.z-perm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--z-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
    background: #fff;
}
.z-perm-item:hover { border-color: var(--z-primary); background: #fafbff; }
.z-perm-item input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--z-primary); }
.z-perm-item-label { font-size: 13.5px; color: var(--z-text); }

.z-perm-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; }
.z-perm-chips--template { margin-top: 8px; }
.z-perm-chips.is-collapsed,
.z-choose-list.is-collapsed { display: none; }
.z-chip-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--z-border, rgba(0, 0, 0, 0.12));
    border-radius: 999px;
    color: var(--z-primary, #1e2ee6);
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.z-chip-toggle:hover { background: var(--z-primary-soft, rgba(30, 42, 120, 0.08)); border-color: var(--z-primary, #1e2ee6); }
.z-chip-toggle-caret { font-size: 10px; transition: transform .2s ease; }
.z-chip-toggle.is-open .z-chip-toggle-caret { transform: rotate(180deg); }

/* Category cards on the My Tests screen reuse the admin-template tile chrome
   (.z-test-tile--template) so the typography, padding, shadow and hover feel
   match the "Available right now" cards. The modifier below only tweaks the
   test-pill row: completed tests pick up the per-category accent + a check. */
.z-test-tile--category .z-chip.is-done {
    background: var(--z-cat-accent, var(--z-primary));
    border-color: var(--z-cat-accent, var(--z-primary));
    color: #fff;
}
.z-test-tile--wellbeing   { --z-cat-accent: #1E2A78; } /* ZOE1 navy */
.z-test-tile--personality { --z-cat-accent: #4C5CC6; } /* ZOE1 indigo mid */
.z-test-tile--language    { --z-cat-accent: #FF6A3D; } /* ZOE1 coral */
.z-test-tile--career      { --z-cat-accent: #0F1854; } /* ZOE1 ink */


/* ---- Button variants used in the admins table ---- */
.z-btn-danger { color: #c62828; }
.z-btn-danger:hover { color: #8e0000; }

/* ============================================================
   MHQ — Sapient Labs-style report
   Hero score + category band, horizontal gradient spectrum
   with pointer, six-dimension grid of mini spectrums + facets.
   ============================================================ */
.z-mhq-sapient { padding: 28px 32px; }
.z-mhq-sapient:hover { transform: none; box-shadow: var(--z-shadow-sm); }
.z-mhq-hero { display: flex; gap: 32px; align-items: center; margin-bottom: 24px; }
.z-mhq-hero-main { flex: 1; min-width: 0; }
.z-mhq-hero-eyebrow {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.16em;
    color: var(--z-text-muted);
    margin-bottom: 10px;
}
.z-mhq-hero-num {
    font-family: var(--z-font-serif);
    font-size: clamp(56px, 7vw, 84px);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}
.z-mhq-hero-category {
    display: inline-block;
    padding: 6px 18px;
    border-radius: var(--z-radius-pill);
    font-size: 13px; font-weight: 700;
    color: #fff;
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.z-mhq-hero-summary {
    margin: 10px 0 0;
    padding: 12px 16px;
    font-family: var(--z-font-serif);
    font-size: 16px; font-weight: 600; line-height: 1.5;
    color: var(--z-text);
    max-width: 60ch;
    border-left: 3px solid var(--z-primary, #4F46E5);
    background: rgba(79, 70, 229, 0.04);
    border-radius: 0 6px 6px 0;
    letter-spacing: -0.005em;
}
.z-mhq-hero-stats {
    display: flex; gap: 24px;
    padding-left: 24px;
    border-left: 1px solid var(--z-border);
    align-self: stretch;
    align-items: center;
    flex-shrink: 0;
}
.z-mhq-hero-stat { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.z-mhq-hero-stat-num {
    font-family: var(--z-font-serif);
    font-size: 28px; font-weight: 600; color: var(--z-text);
    line-height: 1;
}
.z-mhq-hero-stat-label {
    font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--z-text-muted);
}

/* Horizontal gradient spectrum */
.z-mhq-spectrum { padding-top: 44px; padding-bottom: 32px; position: relative; }
.z-mhq-spectrum-bar {
    position: relative;
    width: 100%; height: 18px;
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 36, 0.08);
}
.z-mhq-spectrum-pointer {
    position: absolute;
    bottom: 100%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center;
    gap: 2px;
}
.z-mhq-spectrum-pointer-chip {
    font-family: var(--z-font-serif);
    font-weight: 600;
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--z-radius-pill);
    font-size: 14px; line-height: 1.1;
    box-shadow: 0 4px 14px rgba(15, 23, 36, 0.18);
    white-space: nowrap;
}
.z-mhq-spectrum-pointer-tip {
    display: block;
    width: 0; height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid currentColor; /* colored inline per band */
}
.z-mhq-spectrum-labels {
    position: relative;
    margin-top: 10px;
    height: 20px;
}
.z-mhq-spectrum-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 11.5px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    white-space: nowrap;
}
.z-mhq-spectrum-label.is-current {
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

/* Six-dimension grid */
.z-mhq-dim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
}
.z-mhq-dim-card {
    background: #fff;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    padding: 18px 20px;
    display: flex; flex-direction: column; gap: 12px;
}
.z-mhq-dim-card-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.z-mhq-dim-card-title {
    font-family: var(--z-font-serif);
    font-size: 17px; font-weight: 600;
    color: var(--z-text);
    margin: 0; letter-spacing: -0.01em;
}
.z-mhq-dim-card-score {
    font-family: var(--z-font-serif);
    font-size: 28px; font-weight: 600;
    line-height: 1; letter-spacing: -0.02em;
}
.z-mhq-dim-spectrum { padding-top: 2px; }
.z-mhq-dim-spectrum-bar {
    position: relative;
    width: 100%; height: 10px;
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 36, 0.08);
}
.z-mhq-dim-spectrum-pointer {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}
.z-mhq-dim-spectrum-dot {
    display: block;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 36, 0.22), 0 0 0 1px rgba(15, 23, 36, 0.1);
}
.z-mhq-dim-card-band {
    margin-top: 8px;
    font-size: 11.5px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.z-mhq-dim-facets {
    list-style: none;
    margin: 4px 0 0;
    padding: 10px 0 0;
    border-top: 1px dashed var(--z-border);
    display: flex; flex-direction: column; gap: 6px;
}
.z-mhq-dim-facet {
    display: grid;
    grid-template-columns: minmax(110px, 1.4fr) 2fr 30px;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}
.z-mhq-dim-facet-name { color: var(--z-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-mhq-dim-facet-bar {
    position: relative;
    height: 6px; border-radius: 999px;
    background: #eef0f6;
    overflow: hidden;
}
.z-mhq-dim-facet-bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.z-mhq-dim-facet-num { font-weight: 600; color: var(--z-text); text-align: right; }
.z-mhq-dim-facet.is-lowconf { opacity: 0.55; }

/* Three cards: strengths / growth / self-care */
.z-mhq-sapient-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.z-mhq-sapient-list {
    background: #fff;
    border-radius: var(--z-radius-md);
    padding: 18px 20px;
    border: 1px solid var(--z-border);
}
.z-mhq-sapient-list--strengths { background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%); border-color: #a7f3d0; }
.z-mhq-sapient-list--growth    { background: linear-gradient(180deg, #fefce8 0%, #fff 100%); border-color: #fde68a; }
.z-mhq-sapient-list--care      { background: linear-gradient(180deg, #eff6ff 0%, #fff 100%); border-color: #bfdbfe; }
.z-mhq-sapient-list-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.z-mhq-sapient-list-icon {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(15, 23, 36, 0.04);
}
.z-mhq-sapient-list-icon svg { width: 18px; height: 18px; }
.z-mhq-sapient-list--strengths .z-mhq-sapient-list-icon { background: #d1fae5; color: #047857; }
.z-mhq-sapient-list--growth    .z-mhq-sapient-list-icon { background: #fef3c7; color: #92400e; }
.z-mhq-sapient-list--care      .z-mhq-sapient-list-icon { background: #dbeafe; color: #1d4ed8; }
.z-mhq-sapient-list-label {
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--z-text);
}
.z-mhq-sapient-list ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.z-mhq-sapient-list li { font-size: 13.5px; line-height: 1.5; color: var(--z-text); }

.z-mhq-footcard .z-mhq-method,
.z-mhq-footcard .z-mhq-disclaimer { color: var(--z-text-muted); font-size: 12.5px; margin: 0 0 10px; }
.z-mhq-footcard .z-mhq-method:last-child,
.z-mhq-footcard .z-mhq-disclaimer:last-child { margin-bottom: 0; }
.z-mhq-footcard .z-mhq-support {
    background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
    padding: 12px 14px; border-radius: var(--z-radius-md);
    font-size: 13.5px; line-height: 1.5;
    margin-bottom: 10px;
}

/* ---- Enhanced MHQ hero: dial on the left, explain sentence under number ---- */
.z-mhq-hero-dial {
    flex: 0 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: 120px;
}
.z-mhq-dial {
    width: 108px; height: 108px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(15, 23, 36, 0.08));
}
.z-mhq-dial-label {
    font-family: var(--z-font-serif);
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--z-text-muted);
}
.z-mhq-hero-arrow {
    font-size: 14px; line-height: 1;
    margin: 0 0 2px 1px;
    opacity: .85;
}
.z-mhq-hero-explain {
    margin: 10px 0 0;
    font-size: 13.5px; line-height: 1.6;
    color: var(--z-text-muted);
    max-width: 56ch;
}
.z-mhq-hero-explain strong { color: var(--z-text); font-weight: 700; }

/* ---- Spectrum: band labels above, numeric ticks + caption below ---- */
.z-mhq-spectrum { padding-top: 54px; padding-bottom: 60px; position: relative; }
.z-mhq-spectrum-pointer { z-index: 2; }
.z-mhq-spectrum-labels--top {
    position: relative;
    height: 20px;
    margin-bottom: 6px;
}
.z-mhq-spectrum-labels--top .z-mhq-spectrum-label {
    bottom: 0;
    top: auto;
}
.z-mhq-spectrum-ticks {
    position: relative;
    height: 28px;
    margin-top: 10px;
}
.z-mhq-spectrum-tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.z-mhq-spectrum-tick-mark {
    width: 1px; height: 6px;
    background: var(--z-text-muted);
    opacity: .55;
}
.z-mhq-spectrum-tick-val {
    font-size: 11px; font-weight: 600;
    color: var(--z-text-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.z-mhq-spectrum-caption {
    position: absolute;
    left: 0; right: 0; bottom: 10px;
    text-align: center;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--z-text-muted);
}

/* ---- Pictographs: band face emojis + dim card icons + hero sparkles ---- */
.z-mhq-spectrum-labels--top { height: 36px; margin-bottom: 4px; }
.z-mhq-spectrum-labels--top .z-mhq-spectrum-label {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px;
    bottom: 0; top: auto;
}
.z-mhq-spectrum-face {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 0;
}
.z-mhq-spectrum-face svg { width: 100%; height: 100%; display: block; }
.z-mhq-spectrum-label-text { display: inline-block; }
.z-mhq-spectrum-label.is-current .z-mhq-spectrum-face {
    width: 20px; height: 20px;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 36, 0.18));
}

.z-mhq-dim-card-head {
    display: flex; align-items: center; gap: 10px;
}
.z-mhq-dim-card-icon {
    flex: 0 0 auto;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: currentColor;
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
    isolation: isolate;
}
.z-mhq-dim-card-icon::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: #fff;
    opacity: .86;
    z-index: 0;
}
.z-mhq-dim-card-icon svg {
    width: 20px; height: 20px;
    position: relative; z-index: 1;
    display: block;
}
.z-mhq-dim-card-title { flex: 1; min-width: 0; }

.z-mhq-hero-dial { position: relative; }
.z-mhq-dial-sparkle {
    position: absolute;
    pointer-events: none;
    color: var(--z-primary);
    opacity: .55;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 36, 0.1));
    animation: z-mhq-twinkle 3.2s ease-in-out infinite;
}
.z-mhq-dial-sparkle--a { top: -4px; left: -2px; width: 14px; height: 14px; animation-delay: 0s; }
.z-mhq-dial-sparkle--b { top: 8px; right: -4px; width: 10px; height: 10px; animation-delay: 1.4s; color: #f59e0b; opacity: .7; }
@keyframes z-mhq-twinkle {
    0%, 100% { transform: scale(0.9); opacity: .4; }
    50%      { transform: scale(1.1); opacity: .85; }
}
@media (prefers-reduced-motion: reduce) {
    .z-mhq-dial-sparkle { animation: none; opacity: .6; }
}

/* Full-survey scorecard hero: inline /100 denominator next to the big number. */
.z-sc-hero-card { margin-bottom: 18px; }
.z-sc-hero-card .z-mhq-spectrum { padding-bottom: 36px; }
/* Big Five + Career Interests side-by-side (two card panels in one row). */
.z-sc-trait-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}
.z-sc-trait-pair > .z-sc-section {
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-lg);
    padding: 20px 22px;
    margin: 0;
    box-shadow: var(--z-shadow-sm);
}
.z-sc-trait-pair .z-bigfive-row { grid-template-columns: 140px 1fr 36px; }
@media (max-width: 900px) {
    .z-sc-trait-pair { grid-template-columns: 1fr; }
}

/* Two-card hero layout: overall score and score bar sit side by side. */
.z-sc-hero-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}
.z-sc-hero-pair .z-sc-hero-card { margin-bottom: 0; height: 100%; }
.z-sc-hero-pair .z-sc-hero-card--score .z-mhq-hero { margin-bottom: 0; }
.z-sc-hero-pair .z-sc-hero-card--spectrum { display: flex; align-items: center; }
.z-sc-hero-pair .z-sc-hero-card--spectrum .z-mhq-spectrum { width: 100%; }
@media (max-width: 900px) {
    .z-sc-hero-pair { grid-template-columns: 1fr; }
}
.z-sc-hero-denom {
    font-family: var(--z-font-serif);
    font-size: 0.35em;
    font-weight: 500;
    color: var(--z-text-muted);
    margin-left: 6px;
    letter-spacing: 0.02em;
}
/* Big score + readiness label side-by-side. Uses inline-block so the two
   elements line up horizontally no matter what; a 2-column grid also wraps
   them if the browser supports it (same result). The !important on both
   display + white-space defeats any inherited layout rule from the hero
   column. */
.z-sc-hero-num-row {
    display: block !important;
    white-space: nowrap !important;
    margin-bottom: 10px;
    width: 100%;
    overflow: hidden;
    font-size: 0;              /* strip inline-block whitespace gaps between children */
}
.z-sc-hero-num-row .z-mhq-hero-num {
    display: inline-block !important;
    vertical-align: middle;
    margin-bottom: 0 !important;
    font-size: clamp(40px, 5vw, 64px) !important;
    line-height: 1;
    white-space: nowrap;
}
.z-sc-hero-num-row .z-sc-hero-readiness {
    display: inline-block !important;
    vertical-align: middle;
    margin-left: 18px;
    padding-left: 18px;
    border-left: 2px solid var(--z-border);
    line-height: 1.15;
    font-size: 14px;           /* reset from parent's font-size: 0 */
}
.z-sc-hero-readiness-label {
    display: block;
    font-family: var(--z-font-serif);
    font-size: 18px; font-weight: 700;
    color: var(--z-text);
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.z-sc-hero-readiness-sub {
    display: block;
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--z-text-muted);
    margin-top: 3px;
    white-space: nowrap;
}

@media (max-width: 820px) {
    .z-mhq-sapient { padding: 20px; }
    .z-mhq-hero { flex-direction: column; gap: 20px; align-items: flex-start; }
    .z-mhq-hero-dial { align-self: center; }
    .z-mhq-hero-stats { padding-left: 0; border-left: 0; border-top: 1px solid var(--z-border); padding-top: 16px; align-self: stretch; }
    .z-mhq-spectrum-labels { height: auto; min-height: 36px; }
    .z-mhq-spectrum-label { font-size: 10.5px; }
    .z-mhq-spectrum-tick-val { font-size: 10px; }
    /* Thin out the ticks on narrow screens so labels don't collide. */
    .z-mhq-spectrum-tick:nth-child(even) .z-mhq-spectrum-tick-val { display: none; }
}

/* ============================================================
   My Growth — redesigned hero, stats, insights, timeline,
   polished comparison rows, and per-test rich cards.
   ============================================================ */
.z-growth-note { font-size: 12.5px; color: var(--z-text-muted); margin: 0 0 12px; }

/* ---- Hero (gradient card like score-hero) ---- */
.z-growth-hero {
    position: relative; overflow: hidden;
    display: flex; align-items: stretch; gap: 24px;
    padding: 28px 32px;
    margin-bottom: 18px;
    border-radius: var(--z-radius-lg);
    color: #fff;
    box-shadow: var(--z-shadow-primary);
    background: linear-gradient(140deg, var(--z-bg-blue-deep, #10169e) 0%, var(--z-primary, #1e2ee6) 55%, var(--z-primary-light, #6a76ff) 100%);
}
.z-growth-hero--up    { background: linear-gradient(140deg, #064e3b 0%, #10b981 55%, #6ee7b7 100%); box-shadow: 0 12px 32px rgba(16,185,129,0.28); }
.z-growth-hero--down  { background: linear-gradient(140deg, #7f1d1d 0%, #dc2626 55%, #fca5a5 100%); box-shadow: 0 12px 32px rgba(220,38,38,0.28); }
.z-growth-hero--flat  { background: linear-gradient(140deg, #334155 0%, #64748b 55%, #cbd5e1 100%); box-shadow: 0 12px 32px rgba(100,116,139,0.26); }
.z-growth-hero::before,
.z-growth-hero::after { content:""; position:absolute; border-radius:50%; pointer-events:none; }
.z-growth-hero::before { top:-70px; right:-60px; width:240px; height:240px; background:rgba(255,255,255,0.08); }
.z-growth-hero::after  { bottom:-50px; left:38%; width:180px; height:180px; background:rgba(255,255,255,0.05); }
.z-growth-hero-main { flex: 1; min-width: 0; position: relative; z-index: 1; }
.z-growth-hero-eyebrow {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: rgba(255,255,255,0.72);
    margin-bottom: 6px;
}
.z-growth-hero-headline {
    font-family: var(--z-font-serif);
    font-size: clamp(22px, 2.6vw, 32px);
    font-weight: 500;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -0.015em;
    line-height: 1.2;
}
.z-growth-hero-sub { color: rgba(255,255,255,0.82); font-size: 13.5px; margin: 0 0 18px; }
.z-growth-hero-nums {
    display: flex; align-items: center; gap: 20px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--z-radius-md);
    width: fit-content;
    margin-bottom: 18px;
}
.z-growth-hero-num { display: flex; flex-direction: column; gap: 2px; }
.z-growth-hero-num-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: rgba(255,255,255,0.6);
}
.z-growth-hero-num-val {
    font-family: var(--z-font-serif);
    font-size: 34px; font-weight: 600;
    color: #fff; line-height: 1; letter-spacing: -0.02em;
}
.z-growth-hero-num-sub { font-size: 11px; color: rgba(255,255,255,0.68); }
.z-growth-hero-num--now .z-growth-hero-num-val { font-size: 40px; }
.z-growth-hero-arrow {
    font-size: 24px; color: rgba(255,255,255,0.8);
    padding: 0 2px;
}
.z-growth-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.z-growth-hero-badge {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-width: 120px;
    padding: 20px;
    border-left: 1px solid rgba(255,255,255,0.22);
}
.z-growth-hero-badge-trend { font-size: 20px; color: rgba(255,255,255,0.9); }
.z-growth-hero-badge-num {
    font-family: var(--z-font-serif);
    font-size: 44px; font-weight: 600;
    color: #fff; line-height: 1; letter-spacing: -0.02em;
}
.z-growth-hero-badge-label {
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: rgba(255,255,255,0.72);
}

/* ---- Stats strip under hero ---- */
.z-growth-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.z-growth-stat {
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px 16px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
}
.z-growth-stat-num {
    font-family: var(--z-font-serif);
    font-size: 26px; font-weight: 600;
    color: var(--z-text); line-height: 1;
    letter-spacing: -0.02em;
}
.z-growth-stat-label {
    font-size: 11.5px; color: var(--z-text-muted);
    font-weight: 600; letter-spacing: 0.04em;
}

/* ---- Insights ---- */
.z-growth-insights { }
.z-insight-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.z-insight {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-sm);
    background: #fafbff;
}
.z-insight-icon {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 12px; font-weight: 700;
    flex-shrink: 0;
}
.z-insight--up   { border-color: #a7f3d0; background: #ecfdf5; }
.z-insight--up   .z-insight-icon { background: #d1fae5; color: #047857; }
.z-insight--down { border-color: #fecaca; background: #fef2f2; }
.z-insight--down .z-insight-icon { background: #fee2e2; color: #b91c1c; }
.z-insight--flat .z-insight-icon { background: #e5e7eb; color: var(--z-text-muted); }
.z-insight-body { font-size: 13.5px; color: var(--z-text); line-height: 1.4; flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---- Timeline (sparkline + date labels) ---- */
.z-timeline-chart { width: 100%; height: 72px; margin-bottom: 10px; }
.z-timeline-labels {
    display: flex; justify-content: space-between; gap: 8px;
    font-size: 11.5px; color: var(--z-text-muted);
}
.z-timeline-label { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.z-timeline-label-score { font-weight: 700; color: var(--z-text); font-family: var(--z-font-serif); font-size: 13px; }
.z-timeline-label-date { font-size: 10.5px; }
.z-timeline-label.is-last .z-timeline-label-score { color: var(--z-primary); }

/* ---- Sparkline SVG ---- */
.z-spark { width: 100%; height: 100%; display: block; }
.z-spark-area { fill: rgba(30, 42, 120, 0.1); stroke: none; }
.z-spark-line { fill: none; stroke: var(--z-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.z-spark-dot  { fill: #fff; stroke: var(--z-primary); stroke-width: 1.5; }
.z-spark-dot--last { fill: var(--z-primary); stroke: #fff; stroke-width: 2; }
/* Up/down tints driven by card modifier */
.z-test-growth-card--up   .z-spark-area { fill: rgba(16, 185, 129, 0.12); }
.z-test-growth-card--up   .z-spark-line,
.z-test-growth-card--up   .z-spark-dot  { stroke: #10b981; }
.z-test-growth-card--up   .z-spark-dot--last { fill: #10b981; stroke: #fff; }
.z-test-growth-card--down .z-spark-area { fill: rgba(220, 38, 38, 0.12); }
.z-test-growth-card--down .z-spark-line,
.z-test-growth-card--down .z-spark-dot  { stroke: #dc2626; }
.z-test-growth-card--down .z-spark-dot--last { fill: #dc2626; stroke: #fff; }

/* ---- Per-test growth cards (rich) ---- */
.z-test-growth-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.z-test-growth-card {
    position: relative;
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px 18px;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    background: #fff;
    transition: transform .18s var(--z-ease), box-shadow .18s var(--z-ease), border-color .18s var(--z-ease);
}
.z-test-growth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15,23,36,0.08);
    border-color: var(--z-primary);
}
.z-test-growth-card--up   { border-left: 3px solid #10b981; }
.z-test-growth-card--down { border-left: 3px solid #dc2626; }
.z-test-growth-card--flat { border-left: 3px solid #94a3b8; }
.z-test-growth-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.z-test-growth-card-title {
    font-family: var(--z-font-serif);
    font-size: 16px; font-weight: 600;
    color: var(--z-text);
    margin: 0; letter-spacing: -0.01em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.z-test-growth-card-nums {
    display: flex; align-items: center; gap: 10px;
}
.z-test-growth-card-num { display: flex; flex-direction: column; gap: 1px; }
.z-test-growth-card-num-val {
    font-family: var(--z-font-serif);
    font-size: 22px; font-weight: 600;
    color: var(--z-text-muted); line-height: 1; letter-spacing: -0.02em;
}
.z-test-growth-card-num--now .z-test-growth-card-num-val { font-size: 28px; color: var(--z-text); }
.z-test-growth-card-num-label {
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--z-text-muted);
}
.z-test-growth-card-arrow { color: var(--z-text-dim); font-size: 18px; }
.z-test-growth-card-spark { height: 42px; }
.z-test-growth-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--z-border);
}
.z-test-growth-card-count {
    font-size: 11.5px; color: var(--z-text-muted);
    font-weight: 600; letter-spacing: 0.04em;
}

@media (max-width: 760px) {
    .z-growth-hero { flex-direction: column; padding: 24px; }
    .z-growth-hero-badge { border-left: 0; border-top: 1px solid rgba(255,255,255,0.22); padding: 16px 0 0; min-width: 0; }
    .z-growth-hero-nums { padding: 10px 12px; gap: 12px; }
    .z-growth-hero-num-val { font-size: 28px; }
    .z-growth-hero-num--now .z-growth-hero-num-val { font-size: 32px; }
}

/* Hero one-line auto-summary */
.z-growth-hero-summary {
    margin: -8px 0 14px;
    padding: 10px 14px;
    font-size: 13px; color: #fff;
    background: rgba(255,255,255,0.12);
    border-left: 3px solid rgba(255,255,255,0.5);
    border-radius: var(--z-radius-sm);
    max-width: 56ch;
}

/* Top movers — two columns of ranked rising/falling items */
.z-topmovers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.z-topmover-col-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--z-text-muted); margin-bottom: 8px;
}
.z-topmover-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.z-topmover-col li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-sm);
    background: #fafbff;
    font-size: 13px;
}
.z-topmover-col--up li   { background: #ecfdf5; border-color: #a7f3d0; }
.z-topmover-col--down li { background: #fef2f2; border-color: #fecaca; }
.z-topmover-name { color: var(--z-text); font-weight: 500; }
@media (max-width: 640px) {
    .z-topmovers { grid-template-columns: 1fr; }
}

/* Type / level transitions grid */
.z-transition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.z-transition {
    display: flex; flex-direction: column; gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    background: var(--z-bg-panel);
}
.z-transition.is-changed { border-left: 3px solid var(--z-primary); background: linear-gradient(180deg, var(--z-primary-softer) 0%, #fff 100%); }
.z-transition.is-same    { opacity: 0.9; }
.z-transition.is-partial { opacity: 0.65; }
.z-transition-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--z-text-muted);
}
.z-transition-row { display: flex; align-items: center; gap: 10px; }
.z-transition-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--z-radius-pill);
    font-weight: 600; font-size: 14px;
    background: #eef0f6;
    color: var(--z-text-muted);
}
.z-transition-pill--now { background: var(--z-primary-softer); color: var(--z-primary); }
.z-transition.is-same .z-transition-pill--now { background: #eef0f6; color: var(--z-text-muted); }
.z-transition-arrow { color: var(--z-text-dim); font-size: 15px; }
.z-transition-note {
    font-size: 10.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--z-text-muted);
}
.z-transition.is-changed .z-transition-note { color: var(--z-primary); }

/* Journey stats variant (second stats strip for lifetime figures) */
.z-growth-stats--journey { margin-top: 4px; }
.z-growth-stats--journey .z-growth-stat {
    background: linear-gradient(180deg, var(--z-primary-softer) 0%, var(--z-bg-panel) 100%);
    border-color: var(--z-primary-soft);
}

/* Narrative story card */
.z-growth-story { background: linear-gradient(180deg, #fafbff 0%, #fff 100%); }
.z-growth-story-body {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--z-text);
    max-width: 68ch;
}

/* Trend arrow on delta chips */
.z-delta { display: inline-flex; align-items: center; gap: 4px; }
.z-delta-arrow { font-size: 10px; opacity: 0.85; }

/* Skills added/dropped — two-column layout inside the card */
.z-growth-careers-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.z-growth-careers-wrap .z-growth-careers { margin-top: 0; }

/* MHQ insufficient-data callout — shown instead of a fabricated composite */
.z-mhq-insufficient { border-left: 4px solid #f59e0b; }
.z-mhq-insufficient-body { font-size: 14.5px; line-height: 1.55; color: var(--z-text); margin: 0 0 10px; }
.z-mhq-insufficient-reason {
    font-size: 12.5px; color: var(--z-text-muted);
    background: #fffbeb; border: 1px solid #fde68a;
    padding: 10px 12px; border-radius: var(--z-radius-sm);
    margin: 0 0 12px;
}
.z-mhq-insufficient-summary { font-size: 13.5px; color: var(--z-text); margin: 0 0 14px; font-style: italic; }
.z-mhq-insufficient-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 600px) {
    .z-perm-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Dashboard — My Test Scores
   Hero + per-test accent cards. Each card picks its own color
   via the --z-tscore-accent / --z-tscore-tint custom props set
   inline on the article element (one accent per test type).
   ============================================================ */
.z-tscore-dash-heading {
    align-items: center;
    gap: 20px;
}
.z-tscore-dash-heading-text {
    flex: 1 1 320px;
    min-width: 0;
    display: flex; flex-direction: column; gap: 6px;
}
.z-tscore-take-btn {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    box-shadow: var(--z-shadow-primary);
    white-space: nowrap;
}
.z-tscore-take-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
@media (max-width: 640px) {
    .z-tscore-take-btn { align-self: flex-start; }
}

.z-tscore-hero {
    position: relative;
    overflow: hidden;
    display: flex; gap: 24px; align-items: stretch;
    padding: 32px 36px;
    margin-bottom: 18px;
    border-radius: var(--z-radius-lg);
    background: linear-gradient(140deg, var(--z-bg-blue-deep) 0%, var(--z-primary) 55%, var(--z-primary-light) 100%);
    color: #fff;
    box-shadow: var(--z-shadow-primary);
}
.z-tscore-hero::before,
.z-tscore-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.z-tscore-hero::before { top: -70px; right: -60px; width: 240px; height: 240px; background: rgba(255,255,255,0.07); }
.z-tscore-hero::after  { bottom: -50px; left: 38%;  width: 180px; height: 180px; background: rgba(255,255,255,0.04); }
.z-tscore-hero-main { position: relative; z-index: 1; display: flex; gap: 32px; align-items: center; flex: 1; min-width: 0; }
.z-tscore-hero-main .z-score-ring-wrap { width: 144px; height: 144px; }
.z-tscore-hero-main .z-score-ring-fill { stroke: #fff; }
.z-tscore-hero-body { min-width: 0; flex: 1; }
.z-tscore-hero-eyebrow {
    display: inline-block; margin-bottom: 6px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: rgba(255,255,255,0.72);
}
.z-tscore-hero-headline {
    font-family: var(--z-font-serif);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 500;
    color: #fff;
    margin: 0 0 8px; line-height: 1.2; letter-spacing: -0.015em;
}
.z-tscore-hero-sub { font-size: 13.5px; color: rgba(255,255,255,0.78); margin: 0 0 18px; }
.z-tscore-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.z-tscore-hero-stats {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr; gap: 10px;
    align-content: center;
    min-width: 180px;
    padding: 18px 20px;
    border-left: 1px solid rgba(255,255,255,0.18);
}
.z-tscore-stat { display: flex; flex-direction: column; gap: 2px; }
.z-tscore-stat-label {
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: rgba(255,255,255,0.65);
}
.z-tscore-stat-value {
    font-family: var(--z-font-serif);
    font-size: 20px; font-weight: 600; color: #fff; line-height: 1.1;
}
.z-tscore-stat-sub { font-size: 11.5px; color: rgba(255,255,255,0.65); }

/* Light buttons used inside the dark hero */
.z-btn-light {
    background: #fff; color: var(--z-primary);
    border: 1px solid rgba(255,255,255,0.9);
    font-weight: 600;
}
.z-btn-light:hover { background: var(--z-primary-softer); border-color: #fff; }
.z-btn-link-white { color: #fff; background: transparent; border: 1px solid transparent; }
.z-btn-link-white:hover { color: #fff; text-decoration: underline; }

/* -------- Grid of per-test cards -------- */
.z-tscore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}
.z-tscore-card {
    --z-tscore-accent: var(--z-primary);
    --z-tscore-tint:   var(--z-primary-softer);
    position: relative;
    display: flex; flex-direction: column; gap: 14px;
    padding: 20px 22px 18px;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: var(--z-radius-md);
    overflow: hidden;
    transition: transform .22s var(--z-ease), box-shadow .22s var(--z-ease), border-color .22s var(--z-ease);
}
.z-tscore-card:hover {
    transform: translateY(-3px);
    border-color: var(--z-tscore-accent);
    box-shadow: 0 14px 36px rgba(15, 23, 36, 0.12);
}
.z-tscore-card.is-empty {
    border-style: dashed;
    background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}
.z-tscore-card.is-empty:hover { transform: none; box-shadow: var(--z-shadow-sm); }
.z-tscore-card-stripe {
    position: absolute; inset: 0 0 auto 0; height: 4px;
    background: var(--z-tscore-accent);
    opacity: 0.9;
}
.z-tscore-card.is-empty .z-tscore-card-stripe { opacity: 0.4; }

.z-tscore-card-head { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.z-tscore-card-icon {
    flex-shrink: 0;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px;
    background: var(--z-tscore-tint);
    color: var(--z-tscore-accent);
}
.z-tscore-card-icon svg { width: 20px; height: 20px; }
.z-tscore-card-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.z-tscore-card-title {
    font-family: var(--z-font-serif);
    font-size: 17px; font-weight: 600;
    color: var(--z-text);
    margin: 0; letter-spacing: -0.01em; line-height: 1.2;
}
.z-tscore-card-tier {
    align-self: flex-start;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    padding: 2px 10px;
    border-radius: var(--z-radius-pill);
    background: var(--z-tscore-tint);
    color: var(--z-tscore-accent);
}
.z-tscore-card-tier--strong  { background: rgba(16,185,129,0.14);  color: #047857; }
.z-tscore-card-tier--solid   { background: rgba(14,165,233,0.14);  color: #0369a1; }
.z-tscore-card-tier--growing { background: rgba(245,158,11,0.16);  color: #92400e; }
.z-tscore-card-tier--early   { background: rgba(239,68,68,0.14);   color: #b91c1c; }
.z-tscore-card-tier--none    { background: #eef0f6;                color: var(--z-text-muted); }

.z-tscore-card-body { display: flex; align-items: center; gap: 18px; }
.z-tscore-ring-wrap {
    position: relative; flex-shrink: 0;
    width: 108px; height: 108px;
}
.z-tscore-ring { width: 108px; height: 108px; transform: rotate(-90deg); }
.z-tscore-ring-bg {
    fill: none;
    stroke: var(--z-tscore-tint);
    stroke-width: 10;
}
.z-tscore-ring-fill {
    fill: none;
    stroke: var(--z-tscore-accent);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1);
}
.z-tscore-ring-label {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.z-tscore-ring-num {
    font-family: var(--z-font-serif);
    font-size: 30px; font-weight: 600;
    line-height: 1; letter-spacing: -0.03em;
    color: var(--z-tscore-accent);
}
.z-tscore-ring-num--em { color: var(--z-text-dim); }
.z-tscore-ring-denom { font-size: 11px; color: var(--z-text-muted); margin-top: 3px; letter-spacing: 0.04em; }

.z-tscore-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.z-tscore-card-headline {
    margin: 0;
    font-size: 13.5px; color: var(--z-text); line-height: 1.45;
}
.z-tscore-card-headline.is-empty { color: var(--z-text-muted); font-style: italic; }
.z-tscore-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.z-tscore-card-meta-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; color: var(--z-text-muted);
    background: #f3f5fb;
    padding: 2px 9px; border-radius: var(--z-radius-pill);
}
.z-tscore-card-meta-chip svg { width: 12px; height: 12px; }
.z-tscore-card-source {
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    padding: 2px 9px; border-radius: var(--z-radius-pill);
}
.z-tscore-card-source--own    { background: var(--z-tscore-tint); color: var(--z-tscore-accent); }
.z-tscore-card-source--survey { background: #eef0f6; color: var(--z-text-muted); }
.z-tscore-card-source--none   { background: #fff; color: var(--z-text-muted); border: 1px dashed var(--z-border-strong); }

.z-tscore-card-actions {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--z-border);
}
.z-tscore-btn-primary {
    background: var(--z-tscore-accent); color: #fff;
    border: 1px solid var(--z-tscore-accent);
    transition: filter .18s var(--z-ease), transform .18s var(--z-ease);
}
.z-tscore-btn-primary:hover { color: #fff; filter: brightness(0.92); transform: translateY(-1px); }
.z-tscore-btn-ghost {
    background: transparent; color: var(--z-tscore-accent);
    border: 1px solid var(--z-border-strong);
}
.z-tscore-btn-ghost:hover { background: var(--z-tscore-tint); border-color: var(--z-tscore-accent); }

@media (max-width: 760px) {
    .z-tscore-hero { flex-direction: column; align-items: stretch; padding: 24px; gap: 18px; }
    .z-tscore-hero-main { gap: 20px; }
    .z-tscore-hero-main .z-score-ring-wrap { width: 110px; height: 110px; }
    .z-tscore-hero-main .z-score-ring { width: 110px; height: 110px; }
    .z-tscore-hero-stats { grid-template-columns: 1fr 1fr; border-left: 0; border-top: 1px solid rgba(255,255,255,0.18); padding: 16px 0 0; }
    .z-tscore-card-body { flex-direction: column; align-items: flex-start; gap: 14px; }
    .z-tscore-ring-wrap, .z-tscore-ring { width: 96px; height: 96px; }
    .z-tscore-ring-num { font-size: 26px; }
}

/* ============================================================
   MBTI test-result enrichments (hero, letters, stack, grow)
   ============================================================ */

.z-mbti-hero { padding: 24px 28px; }
.z-mbti-hero-row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.z-mbti-hero-code { display: flex; gap: 8px; }
.z-mbti-hero-letter {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 68px;
    background: linear-gradient(180deg, var(--z-primary, #1e2ee6) 0%, var(--z-primary-deep, #141fb1) 100%);
    color: #fff; font-weight: 800; font-size: 32px; letter-spacing: 1px;
    border-radius: 10px; box-shadow: var(--z-shadow-sm);
}
.z-mbti-hero-meta { flex: 1 1 320px; min-width: 220px; }
.z-mbti-hero-nickname {
    text-transform: uppercase; letter-spacing: 2px; font-size: 11px;
    color: var(--z-text-muted, #5b6478); margin-bottom: 4px;
}
.z-mbti-hero-title { font-size: 28px; font-weight: 800; color: var(--z-text, #0f172a); margin: 0 0 8px; }
.z-mbti-hero-tagline { font-size: 15px; color: var(--z-text, #0f172a); margin: 0 0 10px; font-style: italic; }
.z-mbti-hero-summary { font-size: 14px; color: var(--z-text-muted, #5b6478); margin: 0; line-height: 1.6; }

.z-mbti-letters {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px; margin-top: 12px;
}
.z-mbti-letter-card {
    display: flex; gap: 12px; padding: 14px 16px;
    background: #fafbfd; border: 1px solid #e5e9f2; border-radius: 10px;
}
.z-mbti-letter-badge {
    flex: 0 0 36px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--z-primary, #1e2ee6); color: #fff;
    font-size: 22px; font-weight: 800; border-radius: 8px;
}
.z-mbti-letter-body { flex: 1; min-width: 0; }
.z-mbti-letter-full { font-weight: 700; font-size: 14px; color: var(--z-text, #0f172a); }
.z-mbti-letter-blurb { font-size: 12.5px; color: var(--z-text-muted, #5b6478); line-height: 1.5; margin: 4px 0 8px; }
.z-mbti-letter-leanbar {
    position: relative; height: 5px; background: #eef1f8;
    border-radius: 3px; overflow: hidden; margin-bottom: 4px;
}
.z-mbti-letter-leanbar-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg, var(--z-primary, #1e2ee6), var(--z-primary-deep, #141fb1));
    border-radius: 3px;
}
.z-mbti-letter-leaninfo { font-size: 11px; color: var(--z-text-muted, #5b6478); }
.z-mbti-letter-leaninfo strong { color: var(--z-text, #0f172a); font-weight: 700; }

.z-mbti-style-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px; margin-top: 12px;
}
.z-mbti-style-card {
    padding: 14px 16px; background: #fafbfd;
    border: 1px solid #e5e9f2; border-radius: 10px;
}
.z-mbti-style-label {
    text-transform: uppercase; letter-spacing: 1.4px; font-size: 10.5px;
    color: var(--z-primary-deep, #141fb1); font-weight: 800; margin-bottom: 8px;
}
.z-mbti-style-card p { font-size: 13.5px; color: var(--z-text, #0f172a); line-height: 1.55; margin: 0; }

.z-mbti-stack {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; counter-reset: zmbti;
}
.z-mbti-stack-item {
    position: relative; padding: 16px 16px 14px 54px;
    background: #fafbfd; border: 1px solid #e5e9f2; border-radius: 10px;
    counter-increment: zmbti;
}
.z-mbti-stack-item::before {
    content: counter(zmbti);
    position: absolute; left: 14px; top: 14px;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--z-primary, #1e2ee6); color: #fff;
    font-weight: 800; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.z-mbti-stack-role {
    text-transform: uppercase; letter-spacing: 1.4px; font-size: 10.5px;
    color: var(--z-text-muted, #5b6478); font-weight: 700;
}
.z-mbti-stack-fn { font-size: 20px; font-weight: 800; color: var(--z-text, #0f172a); margin: 2px 0 6px; }
.z-mbti-stack-desc { font-size: 12.5px; color: var(--z-text-muted, #5b6478); line-height: 1.5; margin: 0; }

.z-mbti-grow-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px; margin-top: 12px;
}
.z-mbti-grow-card {
    padding: 14px 16px; background: #fafbfd;
    border: 1px solid #e5e9f2; border-radius: 10px;
}
.z-mbti-grow-label {
    text-transform: uppercase; letter-spacing: 1.4px; font-size: 10.5px;
    color: var(--z-primary-deep, #141fb1); font-weight: 800; margin-bottom: 10px;
}
.z-mbti-grow-card ul { margin: 0; padding-left: 18px; }
.z-mbti-grow-card li { font-size: 13px; color: var(--z-text, #0f172a); line-height: 1.55; margin-bottom: 4px; }
.z-mbti-grow-pills { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.z-mbti-pill {
    display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: 600;
    background: #eef1f8; color: var(--z-primary-deep, #141fb1);
    border-radius: 999px;
}
.z-mbti-pill--alt { background: var(--z-primary-deep, #141fb1); color: #fff; }

@media (max-width: 720px) {
    .z-mbti-hero { padding: 20px; }
    .z-mbti-hero-letter { width: 44px; height: 56px; font-size: 24px; }
    .z-mbti-hero-title { font-size: 22px; }
}

/* ============================================================
   Admin · Import Files (drag-and-drop uploader + file grid)
   ============================================================ */
.z-dash-nav-icon--imports { background: rgba(139,92,246,.15); color: #6d28d9; }

.z-dropzone {
    position: relative;
    border: 2px dashed #c7d2e5;
    background: #f8faff;
    border-radius: var(--z-radius-md);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s var(--z-ease-out), background .18s var(--z-ease-out), transform .18s var(--z-ease-out);
    outline: none;
}
.z-dropzone:hover,
.z-dropzone:focus-visible { border-color: var(--z-primary); background: var(--z-primary-softer, #eef1ff); }
.z-dropzone.is-drag {
    border-color: var(--z-primary);
    background: var(--z-primary-soft, #e4e8ff);
    transform: scale(1.005);
}
.z-dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.z-dropzone-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--z-primary);
    box-shadow: 0 2px 10px rgba(28, 42, 110, 0.08);
}
.z-dropzone-text { font-size: 15px; color: var(--z-text); display: flex; flex-direction: column; gap: 2px; }
.z-dropzone-text strong { font-weight: 700; font-size: 16px; }
.z-dropzone-text span { font-size: 13px; color: var(--z-text-muted); }
.z-dropzone-browse {
    appearance: none; background: none; border: 0; padding: 0;
    color: var(--z-primary); font-weight: 600; cursor: pointer; text-decoration: underline;
    pointer-events: auto;
}
.z-dropzone-browse:hover { color: var(--z-primary-deep, var(--z-primary)); }
.z-dropzone-hint { font-size: 12px; color: var(--z-text-muted); margin-top: 2px; }
.z-dropzone-hint code {
    background: #eef1f8; padding: 1px 6px; border-radius: 4px;
    font-size: 11.5px; color: var(--z-text);
}
.z-dropzone-progress { margin-top: 14px; }
.z-dropzone-progress-bar {
    height: 6px; background: #e5e9f4; border-radius: 999px; overflow: hidden; margin-bottom: 6px;
}
.z-dropzone-progress-bar span {
    display: block; height: 100%; width: 0%;
    background: var(--z-primary);
    transition: width .15s linear;
}
.z-dropzone-progress-label { font-size: 12.5px; color: var(--z-text-muted); }
.z-dropzone-errors {
    margin-top: 10px; padding: 10px 12px;
    background: #fde3e3; color: #a52322;
    border-radius: var(--z-radius-md);
    font-size: 13px;
}

.z-imports-path {
    display: inline-block;
    max-width: 420px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    vertical-align: bottom;
    background: #f3f5fb; padding: 2px 8px; border-radius: 4px;
    font-size: 12px; color: var(--z-text);
}
.z-imports-copied { color: #0e7a3a !important; }
.z-imports-copyfail { color: #a52322 !important; }
.z-imports-row-new { animation: z-imports-flash 1s ease; }
.z-imports-row-removing { opacity: 0; transition: opacity .18s ease; }
@keyframes z-imports-flash {
    0%   { background: var(--z-primary-softer, #eef1ff); }
    100% { background: transparent; }
}

@media (max-width: 720px) {
    .z-imports-path { max-width: 180px; }
    .z-dropzone { padding: 20px 14px; }
}

/* ================================================================
   Welcome / onboarding screen (post-register).
   Scripted chat with a top CTA for users who'd rather jump straight
   into the detailed survey. Lives on the public topbar layout, so
   its own breathing room comes from the section's margins.
   ================================================================ */
.z-welcome {
    width: 100%;
    max-width: 780px;
    margin: 36px auto 72px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ---- Top CTA ---- */
.z-welcome-detailed {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, var(--z-primary-softer) 100%);
    border: 1px solid var(--z-primary-soft);
    box-shadow: 0 10px 30px -18px rgba(30, 42, 120, 0.35);
}
.z-welcome-detailed-icon {
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--z-primary), var(--z-primary-dark));
    color: #fff;
    box-shadow: 0 8px 16px -8px var(--z-primary);
}
.z-welcome-detailed-icon svg { width: 22px; height: 22px; }
.z-welcome-detailed-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}
.z-welcome-detailed-body h3 {
    margin: 0;
    font-family: var(--z-font-serif);
    font-weight: 500;
    font-size: 17px;
    color: var(--z-text);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.z-welcome-detailed-body p {
    margin: 0;
    font-size: 13px;
    color: var(--z-text-muted);
    line-height: 1.45;
}
.z-welcome-detailed-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.z-welcome-detailed-btn svg { transition: transform .16s ease; }
.z-welcome-detailed-btn:hover svg { transform: translateX(3px); }

/* ---- Hero heading ---- */
.z-welcome-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.z-welcome-pill {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}
.z-welcome-hero h1 {
    margin: 0;
    font-family: var(--z-font-serif);
    font-weight: 500;
    font-size: clamp(32px, 4.4vw, 44px);
    letter-spacing: -0.025em;
    line-height: 1.08;
    color: var(--z-text);
}
.z-welcome-hero p {
    margin: 0;
    max-width: 520px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--z-text-muted);
}

/* ---- Chat panel ---- */
.z-welcome-chat {
    position: relative;
    background: var(--z-bg-panel);
    border: 1px solid var(--z-border);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 36, 0.04),
        0 24px 48px -24px rgba(15, 23, 36, 0.18);
}
.z-welcome-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--z-border);
    background:
        radial-gradient(560px 180px at 10% -40%, rgba(30, 42, 120, 0.09), transparent 60%),
        var(--z-bg-panel);
}
.z-welcome-chat-avatar {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--z-primary-light), var(--z-primary));
    color: #fff;
    font-family: var(--z-font-serif);
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 6px 14px -6px var(--z-primary);
}
.z-welcome-chat-head-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}
.z-welcome-chat-head-name {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--z-text);
    letter-spacing: -0.005em;
}
.z-welcome-chat-head-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--z-text-muted);
}
.z-welcome-chat-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2ea043;
    box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.18);
    animation: z-welcome-pulse 2.4s ease-in-out infinite;
}
@keyframes z-welcome-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.18); }
    50%      { box-shadow: 0 0 0 6px rgba(46, 160, 67, 0.08); }
}
.z-welcome-chat-progress {
    font-size: 12px;
    color: var(--z-text-muted);
    font-variant-numeric: tabular-nums;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f4f6fb;
    border: 1px solid var(--z-border);
}
.z-welcome-chat-progress [data-welcome-step-current] { font-weight: 700; color: var(--z-text); }

.z-welcome-chat-scroll {
    padding: 18px 20px;
    min-height: 220px;
    max-height: 440px;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.z-welcome-chat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.z-welcome-msg {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    animation: z-welcome-slide .22s ease both;
}
.z-welcome-msg.is-user { justify-content: flex-end; }
@keyframes z-welcome-slide {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.z-welcome-avatar {
    width: 32px; height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--z-primary-light), var(--z-primary));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 10px -4px var(--z-primary);
}
.z-welcome-avatar.is-user {
    background: #e8ecf6;
    color: var(--z-text);
    box-shadow: 0 2px 6px -2px rgba(15, 23, 36, 0.15);
}
.z-welcome-bubble {
    max-width: 78%;
    padding: 11px 15px;
    border-radius: 18px;
    background: #f4f6fb;
    color: var(--z-text);
    font-size: 14.5px;
    line-height: 1.55;
    border-bottom-left-radius: 6px;
}
.z-welcome-bubble.is-user {
    background: linear-gradient(135deg, var(--z-primary), var(--z-primary-dark));
    color: #fff;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 6px;
    box-shadow: 0 6px 14px -8px var(--z-primary);
}
.z-welcome-bubble.is-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 13px 15px;
}
.z-welcome-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #c8cfe0;
    animation: z-welcome-bounce 1.1s ease-in-out infinite;
}
.z-welcome-dot:nth-child(2) { animation-delay: .15s; }
.z-welcome-dot:nth-child(3) { animation-delay: .30s; }
@keyframes z-welcome-bounce {
    0%, 80%, 100% { transform: translateY(0);   opacity: .55; }
    40%           { transform: translateY(-4px); opacity: 1; }
}

/* ---- Input row ---- */
.z-welcome-chat-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, transparent 0%, #fafbff 100%);
    border-top: 1px solid var(--z-border);
}
.z-welcome-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.z-welcome-chip-row.is-compact {
    gap: 6px;
}
.z-welcome-chip-row.is-compact .z-welcome-chip {
    min-width: 44px;
    padding: 8px 10px;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.z-welcome-chip {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--z-border);
    background: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--z-text);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease, color .15s ease, box-shadow .15s ease;
}
.z-welcome-chip:hover {
    border-color: var(--z-primary);
    background: var(--z-primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -8px var(--z-primary);
}

.z-welcome-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.z-welcome-chat-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--z-border);
    border-radius: 999px;
    font: inherit;
    font-size: 14.5px;
    color: var(--z-text);
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.z-welcome-chat-input:focus {
    outline: none;
    border-color: var(--z-primary);
    box-shadow: 0 0 0 4px var(--z-primary-softer);
}
.z-welcome-send {
    width: 42px; height: 42px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 16px -8px var(--z-primary);
}
.z-welcome-send svg { transform: translateX(1px); }

.z-welcome-select-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.z-welcome-chat-select {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--z-border);
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    color: var(--z-text);
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23555f78' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.z-welcome-chat-select:focus {
    outline: none;
    border-color: var(--z-primary);
    box-shadow: 0 0 0 4px var(--z-primary-softer);
}
.z-welcome-select-submit { flex-shrink: 0; }

/* ---- Done state ---- */
.z-welcome-chat-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 24px;
    border-top: 1px solid var(--z-border);
    text-align: center;
    animation: z-welcome-slide .3s ease both;
}
.z-welcome-chat-done p {
    margin: 0;
    font-size: 14px;
    color: var(--z-text-muted);
}
.z-welcome-done-check {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2ea043, #1b7a30);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -10px rgba(46, 160, 67, 0.6);
}
.z-welcome-done-check svg { width: 26px; height: 26px; }
.z-welcome-chat-done .z-btn-lg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.z-welcome-chat-done .z-btn-lg svg { transition: transform .16s ease; }
.z-welcome-chat-done .z-btn-lg:hover svg { transform: translateX(3px); }

.z-welcome-chat-error {
    padding: 10px 20px 16px;
    color: #c62828;
    font-size: 13px;
    text-align: center;
}

.z-welcome-footnote {
    text-align: center;
    font-size: 13px;
    color: var(--z-text-muted);
}
.z-welcome-footnote a { color: var(--z-primary); font-weight: 500; }

@media (max-width: 620px) {
    .z-welcome { margin: 24px auto 48px; gap: 22px; }
    .z-welcome-detailed { flex-direction: column; align-items: stretch; text-align: center; }
    .z-welcome-detailed-icon { align-self: center; }
    .z-welcome-detailed-btn  { justify-content: center; }
    .z-welcome-bubble { max-width: 86%; }
    .z-welcome-chat-scroll { padding: 14px 16px; }
}

/* ============================================================
   Tenant landing + admin tenant tables (added by multi-tenant rollout)
   ============================================================ */

/* ============================================================
   Tenant branded landing page (/t/<slug>)
   ============================================================ */
/* ============================================================
   Tenant landing page — redesigned 2026
   Hero + horizontal feature strip. No decorative blobs; subtle
   dot grid instead. Dark footer.
   ============================================================ */
.z-tenant-landing {
    position: relative;
    min-height: 100vh;
    padding: 0 24px;
    overflow: hidden;
    background: #fafbff;
    color: var(--z-text, #0f1724);
}
.z-tenant-landing-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(15,23,36,0.06) 1px, transparent 0);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, #000 40%, transparent 100%);
    opacity: 0.9;
}
.z-tenant-landing-inner {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 0 48px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ----- Top bar ----- */
.z-tenant-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--z-text-muted, #5b6478);
}
.z-tenant-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--z-text, #0f1724);
    font-size: 15px;
}
.z-tenant-brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--z-primary, #4150e0);
    box-shadow: 0 0 0 4px rgba(var(--z-primary-rgb, 65, 80, 224), 0.15);
}
.z-tenant-brand-tagline { font-size: 12.5px; }
@media (max-width: 640px) {
    .z-tenant-brand-tagline { display: none; }
}

/* ----- Hero ----- */
.z-tenant-hero {
    text-align: center;
    padding: 56px 32px 60px;
    background: #fff;
    border: 1px solid #e8ebf5;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 36, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.z-tenant-hero-id {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.z-tenant-logo-wrap {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #e8ebf5;
    box-shadow: 0 2px 8px rgba(15, 23, 36, 0.06);
}
.z-tenant-logo { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.z-tenant-logo-wrap--placeholder {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--z-primary, #4150e0);
    background: linear-gradient(135deg, rgba(var(--z-primary-rgb, 65, 80, 224), 0.08), rgba(var(--z-primary-rgb, 65, 80, 224), 0.18));
    border-color: rgba(var(--z-primary-rgb, 65, 80, 224), 0.18);
}
.z-tenant-cat {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--z-primary, #4150e0);
    background: rgba(var(--z-primary-rgb, 65, 80, 224), 0.10);
    border: 1px solid rgba(var(--z-primary-rgb, 65, 80, 224), 0.14);
}

.z-tenant-title {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    font-weight: 700;
    color: var(--z-text, #0f1724);
    letter-spacing: -0.02em;
    max-width: 20ch;
}
.z-tenant-title-brand { color: var(--z-primary, #4150e0); }

.z-tenant-desc {
    margin: 0;
    max-width: 56ch;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--z-text-muted, #4d556b);
}

.z-tenant-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}
.z-tenant-cta-primary,
.z-tenant-cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    min-width: 200px;
    justify-content: center;
}
.z-tenant-cta-primary {
    box-shadow: 0 8px 20px rgba(var(--z-primary-rgb, 65, 80, 224), 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.z-tenant-cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(var(--z-primary-rgb, 65, 80, 224), 0.28);
}
.z-tenant-cta-ghost {
    background: transparent;
    border: 1px solid #d7dbea;
    color: var(--z-text, #0f1724);
}
.z-tenant-cta-ghost:hover {
    border-color: var(--z-primary, #4150e0);
    color: var(--z-primary, #4150e0);
}

.z-tenant-footnote {
    margin: 10px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--z-text-muted, #5b6478);
}
.z-tenant-footnote svg { color: var(--z-primary, #4150e0); flex-shrink: 0; }
.z-tenant-footnote strong { color: var(--z-text, #0f1724); font-weight: 600; }

/* ----- Feature row ----- */
.z-tenant-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.z-tenant-feature {
    position: relative;
    padding: 28px 24px 24px;
    background: #fff;
    border: 1px solid #e8ebf5;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.z-tenant-feature:hover {
    border-color: rgba(var(--z-primary-rgb, 65, 80, 224), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 36, 0.06);
}
.z-tenant-feature-num {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--z-text-muted, #96a0b5);
    font-variant-numeric: tabular-nums;
}
.z-tenant-feature-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--z-primary-rgb, 65, 80, 224), 0.08);
    color: var(--z-primary, #4150e0);
    margin-bottom: 4px;
}
.z-tenant-feature-icon svg { width: 20px; height: 20px; }
.z-tenant-feature-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--z-text, #0f1724);
    letter-spacing: -0.005em;
}
.z-tenant-feature-body {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--z-text-muted, #4d556b);
}

/* ----- Footer ----- */
.z-tenant-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--z-text-muted, #7a8295);
    padding-top: 8px;
}
.z-tenant-footer a {
    color: var(--z-primary, #4150e0);
    text-decoration: none;
    font-weight: 600;
}
.z-tenant-footer a:hover { text-decoration: underline; }
.z-tenant-footer-sep { color: #c4cadc; }

@media (max-width: 820px) {
    .z-tenant-features { grid-template-columns: 1fr; }
    .z-tenant-hero { padding: 44px 24px 48px; }
}
@media (max-width: 480px) {
    .z-tenant-landing { padding: 0 16px; }
    .z-tenant-landing-inner { padding: 20px 0 36px; gap: 32px; }
    .z-tenant-logo-wrap { width: 80px; height: 80px; border-radius: 18px; }
    .z-tenant-cta-primary, .z-tenant-cta-ghost { width: 100%; min-width: 0; }
}

/* Admin tenant / category tables */
.z-tenant-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.z-tenant-cell > div { min-width: 0; }
.z-tenant-cell-logo {
    width: 40px; height: 40px; border-radius: 10px; object-fit: contain;
    background: #f6f6f8; flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.z-tenant-cell-logo--placeholder {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--z-primary, #1e2ee6);
    background: linear-gradient(135deg, rgba(30, 42, 120,.08), rgba(30, 42, 120,.16));
}
.z-code-copy {
    display: inline-block; background: #f6f6f8; padding: 4px 8px;
    border-radius: 6px; font-size: 12px; max-width: 240px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    vertical-align: middle; color: #333; border: 1px solid #ececf2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.z-url-cell { display: inline-flex; align-items: center; gap: 6px; }
.z-url-copy { padding: 4px 8px; display: inline-flex; align-items: center; gap: 4px; }
.z-url-copy.is-copied { color: #2e7d32; }

.z-flash { padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; font-size: 14px; }
.z-flash-success { background: #e6f7ee; color: #116633; border: 1px solid #bfe4cc; }
.z-flash-error   { background: #fdecea; color: #a0180d; border: 1px solid #f5c3bd; }
.z-empty { color: #888; padding: 20px; text-align: center; }
.z-inline-form { display: inline; }
.z-btn-danger  { color: #d9332a; }
.z-btn-danger:hover { color: #fff; background: #d9332a; }
.z-chip-success { background: rgba(46,125,50,.15); color: #2e7d32; }
.z-chip-muted   { background: #efefef; color: #777; }

/* Dense tenant table: give the URL column enough room without truncating too hard */
.z-admin-table td { vertical-align: middle; }

/* Per-tenant brand color swatches */
.z-tenant-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.z-tenant-color-swatch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--z-border, #e6e6ee);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.z-tenant-color-swatch:hover { border-color: #c9cbdc; }
.z-tenant-color-swatch.is-active {
    border-color: var(--z-primary, #1e2ee6);
    box-shadow: 0 0 0 3px rgba(var(--z-primary-rgb), .12);
    background: #fff;
}
.z-tenant-color-swatch input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.z-tenant-color-dot {
    width: 26px; height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.z-tenant-color-dot--custom {
    background: conic-gradient(from 0deg, #ef4444, #f59e0b, #10b981, #14b8a6, #3b82f6, #8b5cf6, #ec4899, #ef4444);
}
.z-tenant-color-dot--none {
    background: #f6f6f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    font-weight: 600;
}
.z-tenant-color-label { font-size: 13px; font-weight: 500; color: var(--z-text, #222); }
.z-tenant-color-custom { margin-top: 14px; }

/* ============================================================
   Tenant Category form — hero, two-column layout, question cards, live preview
   ============================================================ */

/* Hero */
.z-cat-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    margin-bottom: 20px;
    border-radius: 20px;
    background:
        radial-gradient(1200px 200px at 10% -20%, rgba(30, 42, 120,.10), transparent 60%),
        linear-gradient(135deg, #ffffff 0%, #f5f6ff 100%);
    border: 1px solid var(--z-border, #e6e6ee);
    box-shadow: 0 2px 12px rgba(30, 42, 120,.05);
}
.z-cat-hero-icon {
    width: 68px; height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--z-primary, #1e2ee6), #5a6bff);
    box-shadow: 0 6px 20px rgba(30, 42, 120,.28);
    flex-shrink: 0;
}
.z-cat-hero-body { flex: 1; min-width: 0; }
.z-cat-hero-eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--z-primary, #1e2ee6);
    opacity: .8;
}
.z-cat-hero-title { margin: 4px 0 6px; font-size: 26px; font-weight: 700; color: var(--z-text, #1a1b2a); }
.z-cat-hero-sub   { margin: 0; color: var(--z-text-muted, #666); font-size: 14px; line-height: 1.5; max-width: 60ch; }
.z-cat-hero-stats { display: flex; gap: 10px; flex-shrink: 0; }
.z-cat-stat {
    min-width: 72px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--z-border, #e6e6ee);
    text-align: center;
}
.z-cat-stat-value { display: block; font-size: 22px; font-weight: 700; color: var(--z-primary, #1e2ee6); line-height: 1; }
.z-cat-stat-label { display: block; margin-top: 4px; font-size: 11px; color: var(--z-text-muted, #777); text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 840px) {
    .z-cat-hero { flex-wrap: wrap; }
    .z-cat-hero-stats { width: 100%; justify-content: flex-start; }
}

/* Two-column form layout */
.z-cat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}
.z-cat-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

@media (max-width: 1100px) {
    .z-cat-layout { grid-template-columns: 1fr; }
}

/* Section cards (replace the generic z-form-section inside the layout) */
.z-cat-section { padding: 0; overflow: hidden; }
.z-cat-section-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 22px;
    border-bottom: 1px solid var(--z-border, #ececf2);
    background: linear-gradient(180deg, #fcfcff, #ffffff);
}
.z-cat-section-icon {
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(30, 42, 120,.09);
    color: var(--z-primary, #1e2ee6);
    flex-shrink: 0;
}
.z-cat-section-head h2 { margin: 0 0 2px; font-size: 16px; font-weight: 700; color: var(--z-text, #1a1b2a); }
.z-cat-section-head p  { margin: 0; font-size: 13px; color: var(--z-text-muted, #777); line-height: 1.5; }
.z-cat-section-body { padding: 20px 22px; }

/* Question list — timeline-style with left numbered rail */
.z-q-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.z-q-list:empty { display: none; }

.z-q-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    border: 1px solid var(--z-border, #e6e6ee);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(20,20,40,.03);
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.z-q-card:focus-within {
    border-color: var(--z-primary, #1e2ee6);
    box-shadow: 0 4px 20px rgba(30, 42, 120,.10);
}

.z-q-rail {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18px;
    background: linear-gradient(180deg, rgba(30, 42, 120,.06), rgba(30, 42, 120,.02));
    border-right: 1px solid var(--z-border, #ececf2);
}
.z-q-badge {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--z-primary, #1e2ee6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(30, 42, 120,.3);
}

.z-q-body { padding: 0; display: flex; flex-direction: column; min-width: 0; }

.z-q-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f6;
}
.z-q-head > div { flex: 1; min-width: 0; }
.z-q-head-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--z-text-muted, #888);
}
.z-q-head-sub {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--z-text, #1a1b2a);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.z-q-remove {
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #999;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
    flex-shrink: 0;
}
.z-q-remove:hover { background: #fdecea; color: #d9332a; }

.z-q-fields { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.z-q-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 14px;
    align-items: start;
}
@media (max-width: 720px) {
    .z-q-grid { grid-template-columns: 1fr; }
}

.z-q-prompt { font-weight: 500; }

/* Pill toggle between Text / Chips */
.z-q-kind {
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    background: #f1f2f8;
    border-radius: 10px;
    width: fit-content;
}
.z-q-kind-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.z-q-kind-opt:hover { color: var(--z-text, #222); }
.z-q-kind-opt.is-active {
    background: #fff;
    color: var(--z-primary, #1e2ee6);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.z-q-options { animation: zFadeDown .15s ease; }
@keyframes zFadeDown {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.z-q-actions { margin-top: 4px; }
.z-q-add {
    border: 1.5px dashed var(--z-border, #d4d5e0) !important;
    color: var(--z-primary, #1e2ee6) !important;
    background: transparent !important;
    width: 100%;
    justify-content: center;
    padding: 12px !important;
    border-radius: 12px !important;
    font-weight: 600;
    transition: all .15s ease;
}
.z-q-add:hover {
    background: rgba(30, 42, 120,.05) !important;
    border-color: var(--z-primary, #1e2ee6) !important;
    border-style: solid !important;
}

.z-q-empty {
    border: 2px dashed var(--z-border, #e6e6ee);
    border-radius: 14px;
    background: #fafbff;
    padding: 32px 24px;
    text-align: center;
    color: var(--z-text-muted, #888);
    margin-bottom: 14px;
}
.z-q-empty-icon {
    width: 64px; height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 42, 120,.08);
    color: var(--z-primary, #1e2ee6);
}
.z-q-empty strong { display: block; font-size: 15px; color: var(--z-text, #222); margin-bottom: 4px; }
.z-q-empty p { margin: 0; font-size: 13px; line-height: 1.5; max-width: 42ch; margin-left: auto; margin-right: auto; }

/* Form actions row */
.z-cat-actions { padding: 4px 0; }

/* === Live preview (right rail) === */
.z-cat-preview-wrap { position: relative; }
.z-cat-preview-sticky { position: sticky; top: 20px; }

.z-cat-preview-head { padding: 0 4px 14px; }
.z-cat-preview-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--z-primary, #1e2ee6);
}
.z-cat-preview-head h3 { margin: 4px 0 4px; font-size: 15px; font-weight: 700; }
.z-cat-preview-head p  { margin: 0; font-size: 12px; color: var(--z-text-muted, #777); line-height: 1.5; }

.z-cat-preview-phone {
    background: #fff;
    border: 1px solid var(--z-border, #e6e6ee);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(20,20,60,.08);
    overflow: hidden;
}
.z-cat-preview-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--z-primary, #1e2ee6), #5a6bff);
    color: #fff;
}
.z-cat-preview-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #51e39a;
    box-shadow: 0 0 0 2px rgba(81,227,154,.3);
}
.z-cat-preview-top-name { font-size: 13px; font-weight: 700; }
.z-cat-preview-top-status { font-size: 11px; opacity: .85; }

.z-cat-preview-chat {
    padding: 18px 16px;
    max-height: 480px;
    overflow-y: auto;
    background: #fafbff;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.z-cat-preview-chat:empty { padding: 0; }

.z-cat-preview-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.z-cat-preview-ava {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--z-primary, #1e2ee6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.z-cat-preview-bubble {
    background: #fff;
    border: 1px solid #ececf2;
    border-radius: 16px 16px 16px 4px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--z-text, #1a1b2a);
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
    max-width: 85%;
    word-wrap: break-word;
}

.z-cat-preview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 36px;
}
.z-cat-preview-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--z-border, #e0e1ee);
    font-size: 12px;
    color: var(--z-text, #1a1b2a);
    transition: all .15s ease;
}
.z-cat-preview-chip:hover {
    border-color: var(--z-primary, #1e2ee6);
    color: var(--z-primary, #1e2ee6);
}
.z-cat-preview-chips--placeholder {
    font-size: 12px;
    color: var(--z-text-muted, #aaa);
    font-style: italic;
    padding: 6px 0 6px 36px;
}

.z-cat-preview-input {
    margin-left: 36px;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid var(--z-border, #e0e1ee);
    background: #fff;
    color: #bbb;
    font-size: 12px;
    font-style: italic;
}

.z-cat-preview-empty {
    padding: 36px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--z-text-muted, #999);
    background: #fafbff;
}
