/* ==========================================================================
   CORPHEA / Employee Protection — click-dummy design system
   Ported from Figma "Clickdummy EPmini" (node 1:2034).
   Design tokens map 1:1 to the Figma variable collection.
   ========================================================================== */

:root {
    /* Brand */
    --ep-brand: #085668;
    --ep-brand-hover: #064553;
    --ep-corphea: #253264;
    --ep-info: #3b82f6;

    /* Surfaces */
    --ep-surface: #f8fafc;
    --ep-tile: #f8fafc;
    --ep-page: #eef2f4;
    --ep-overlay: rgba(0, 0, 0, 0.2);

    /* Celadon / support greens */
    --ep-celadon-200: #e3f3eb;
    --ep-celadon-300: #d6ece2;
    --ep-celadon-500: #bae0ce;
    --ep-lavender-300: #e8ebf7;
    --ep-chip-new-bg: #e5f1cc;
    --ep-chip-new-text: #064553;

    /* Text */
    --ep-text: #111827;
    --ep-text-secondary: #1f2937;
    --ep-text-neutral: #374151;
    --ep-text-muted: #6d7280;
    --ep-text-faint: #9ca3af;
    --ep-text-inverse: #f8fafc;

    /* Lines & inputs */
    --ep-border: #d2d5da;
    --ep-input-bg: #f8fafc;
    --ep-disabled: #9ca3af;

    /* Radius */
    --ep-radius-xs: 8px;
    --ep-radius-sm: 16px;
    --ep-radius-md: 24px;
    --ep-radius-full: 100px;

    /* Spacing scale */
    --ep-space-1: 4px;
    --ep-space-2: 6px;
    --ep-space-3: 8px;
    --ep-space-4: 12px;
    --ep-space-5: 16px;
    --ep-space-6: 24px;
    --ep-space-7: 32px;
    --ep-space-8: 40px;
    --ep-space-9: 56px;

    /* Shadows */
    --ep-shadow-200: 0 2px 24px rgba(12, 12, 13, 0.10);
    --ep-shadow-btn: 0 8px 20px -6px rgba(8, 86, 104, 0.45);
    --ep-shadow-device: 0 40px 90px -20px rgba(15, 40, 55, 0.35);

    /* Device frame */
    --ep-device-width: 412px;

    --ep-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Page shell / responsive device frame
   -------------------------------------------------------------------------- */

body.ep-body {
    margin: 0;
    font-family: var(--ep-font);
    color: var(--ep-text);
    background: var(--ep-page);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.ep-stage {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    background:
        radial-gradient(1200px 600px at 50% -10%, var(--ep-celadon-200), transparent 60%),
        var(--ep-page);
}

.ep-device {
    width: 100%;
    max-width: var(--ep-device-width);
    background: var(--ep-surface);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* On tablets / desktop the screen becomes a floating "phone" */
@media (min-width: 480px) {
    .ep-stage {
        padding: 32px 16px;
        align-items: flex-start;
    }

    .ep-device {
        min-height: 844px;
        border-radius: 40px;
        box-shadow: var(--ep-shadow-device);
        overflow: hidden;
    }
}

/* Content region inside the device. The device frame grows with its content and
   the browser window is the only scroll container — no scrollbar inside the frame. */
.ep-scroll {
    flex: 1;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.ep-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 var(--ep-space-5) var(--ep-space-6);
    gap: var(--ep-space-6);
}

.ep-screen__body {
    display: flex;
    flex-direction: column;
    gap: var(--ep-space-6);
}

/* pushes a CTA block to the bottom of the viewport when content is short */
.ep-screen__cta {
    margin-top: auto;
    align-self: stretch;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ep-space-4);
    padding-top: var(--ep-space-6);
}

/* --------------------------------------------------------------------------
   Mock mobile status bar
   -------------------------------------------------------------------------- */

.ep-statusbar {
    height: 24px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Top navigation (back arrow + centered title)
   -------------------------------------------------------------------------- */

.ep-topnav {
    height: 60px;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    padding: 0 var(--ep-space-5);
}

.ep-topnav--divider {
    border-bottom: 1px solid var(--ep-border);
}

.ep-topnav__title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--ep-text);
}

.ep-iconbtn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    border-radius: var(--ep-radius-full);
    color: var(--ep-text);
    cursor: pointer;
}

.ep-iconbtn:hover {
    background: rgba(17, 24, 39, 0.06);
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */

.ep-h1 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ep-text);
    margin: 0;
}

.ep-h2 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ep-text);
    margin: 0;
}

.ep-h3 {
    font-size: 22px;
    line-height: 32px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--ep-text);
    margin: 0;
}

.ep-subheading {
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: var(--ep-text);
    margin: 0;
}

.ep-accent {
    color: var(--ep-brand);
}

.ep-body {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: var(--ep-text-neutral);
    margin: 0;
}

.ep-body--sm {
    font-size: 14px;
    line-height: 22px;
}

.ep-body strong,
.ep-body b {
    font-weight: 700;
    color: var(--ep-text);
}

.ep-caption {
    font-size: 12px;
    line-height: 16px;
    color: var(--ep-text-muted);
    margin: 0;
}

.ep-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--ep-info);
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.ep-link:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.ep-btn {
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ep-space-3);
    width: 100%;
    min-height: 56px;
    padding: 0 var(--ep-space-6);
    border: 0;
    border-radius: var(--ep-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.ep-btn:active {
    transform: translateY(1px);
}

.ep-btn--primary {
    background: var(--ep-brand);
    color: var(--ep-text-inverse);
    box-shadow: var(--ep-shadow-btn);
}

.ep-btn--primary:hover {
    background: var(--ep-brand-hover);
}

.ep-btn--primary:disabled {
    background: var(--ep-disabled);
    box-shadow: none;
    cursor: not-allowed;
}

.ep-btn--secondary {
    min-height: 40px;
    background: transparent;
    color: var(--ep-text-secondary);
    font-weight: 600;
    box-shadow: none;
}

.ep-btn--secondary:hover {
    background: rgba(17, 24, 39, 0.05);
}

.ep-btn--ghost-underline {
    background: none;
    border: 0;
    font-weight: 600;
    color: var(--ep-text);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: var(--ep-space-3);
    width: auto;
    min-height: 0;
    font-size: 14px;
}

.ep-btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Inputs
   -------------------------------------------------------------------------- */

.ep-field {
    display: flex;
    flex-direction: column;
    gap: var(--ep-space-3);
}

.ep-field__label {
    font-size: 14px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ep-text);
}

.ep-input {
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: var(--ep-space-3);
    height: 48px;
    padding: 12px 16px;
    background: var(--ep-input-bg);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-xs);
    font-size: 16px;
    color: var(--ep-text-neutral);
    width: 100%;
    box-sizing: border-box;
}

.ep-input:focus,
.ep-input:focus-within {
    outline: 2px solid var(--ep-brand);
    outline-offset: -1px;
}

.ep-input__wrap {
    position: relative;
}

.ep-input__wrap .ep-input {
    padding-right: 44px;
}

.ep-input__affix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    color: var(--ep-text-neutral);
    background: none;
    border: 0;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Logo lockup
   -------------------------------------------------------------------------- */

.ep-logo {
    display: flex;
    align-items: center;
    gap: var(--ep-space-4);
}

.ep-logo__mark {
    width: 72px;
    height: 72px;
    border-radius: var(--ep-radius-full);
    background: #fff;
    border: 1px solid var(--ep-border);
    box-shadow: 0 4px 12px rgba(15, 40, 55, 0.12);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.ep-logo__mark img {
    width: 48px;
    height: 48px;
}

.ep-logo__tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--ep-radius-xs);
    background: var(--ep-celadon-200);
    color: var(--ep-brand);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ep-logo--lg .ep-logo__mark {
    width: 104px;
    height: 104px;
}

.ep-logo--lg .ep-logo__mark img {
    width: 70px;
    height: 70px;
}

/* --------------------------------------------------------------------------
   Progress stepper (1 – 2 – 3)
   -------------------------------------------------------------------------- */

.ep-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ep-space-5) 0;
}

.ep-steps__dot {
    width: 32px;
    height: 32px;
    border-radius: var(--ep-radius-sm);
    border: 1px solid var(--ep-brand);
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--ep-brand);
    background: var(--ep-surface);
    flex-shrink: 0;
}

.ep-steps__dot--active {
    background: var(--ep-brand);
    border-width: 2px;
    color: var(--ep-text-inverse);
}

.ep-steps__dot--done {
    background: var(--ep-celadon-500);
    border-color: var(--ep-celadon-500);
    color: var(--ep-brand);
}

.ep-steps__line {
    height: 2px;
    flex: 1;
    margin: 0 8px;
    border-radius: var(--ep-radius-full);
    background: var(--ep-border);
}

.ep-steps__line--filled {
    background: var(--ep-brand);
}

/* --------------------------------------------------------------------------
   Cards / tiles
   -------------------------------------------------------------------------- */

.ep-card {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-md);
    padding: var(--ep-space-6);
}

.ep-card--flush {
    padding: 0;
    overflow: hidden;
}

.ep-tile {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-md);
    padding: var(--ep-space-5) var(--ep-space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ep-space-4);
}

.ep-note {
    display: flex;
    gap: var(--ep-space-4);
    align-items: flex-start;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    padding: var(--ep-space-5);
    background: var(--ep-surface);
}

.ep-note__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--ep-text-neutral);
}

.ep-note__text {
    font-size: 14px;
    line-height: 22px;
    color: var(--ep-text-neutral);
    margin: 0;
}

.ep-note__text strong {
    font-weight: 700;
    color: var(--ep-text);
}

/* --------------------------------------------------------------------------
   Chips
   -------------------------------------------------------------------------- */

.ep-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--ep-radius-xs);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ep-chip--new {
    background: var(--ep-chip-new-bg);
    color: var(--ep-chip-new-text);
}

.ep-chip--new::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ep-brand);
}

.ep-chip--progress {
    background: var(--ep-lavender-300);
    color: var(--ep-corphea);
}

.ep-chip--done {
    background: var(--ep-celadon-500);
    color: var(--ep-brand);
}

/* --------------------------------------------------------------------------
   Illustration frame
   -------------------------------------------------------------------------- */

.ep-illus {
    border-radius: var(--ep-radius-md);
    background: var(--ep-lavender-300);
    padding: var(--ep-space-5);
    display: grid;
    place-items: center;
}

.ep-illus img {
    width: 100%;
    height: auto;
    display: block;
}

.ep-illus--plain {
    background: transparent;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Option cards (questionnaire answers)
   -------------------------------------------------------------------------- */

.ep-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ep-space-4);
    width: 100%;
    text-align: left;
    padding: 20px var(--ep-space-6);
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--ep-text-neutral);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.ep-option:hover {
    border-color: var(--ep-brand);
}

.ep-option__radio {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--ep-text-faint);
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.ep-option--selected {
    border-color: var(--ep-brand);
    background: var(--ep-celadon-200);
}

.ep-option--selected .ep-option__radio {
    border-color: var(--ep-brand);
    border-width: 2px;
}

.ep-option--selected .ep-option__radio::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ep-brand);
}

/* --------------------------------------------------------------------------
   Results screen specifics
   -------------------------------------------------------------------------- */

.ep-result-brandbar {
    display: flex;
    align-items: center;
    padding: var(--ep-space-5) var(--ep-space-5) var(--ep-space-3);
}

.ep-result-hero {
    background: var(--ep-lavender-300);
    border-radius: var(--ep-radius-md);
    padding: var(--ep-space-5);
    display: grid;
    place-items: center;
}

.ep-result-hero img {
    width: 100%;
    max-width: 320px;
    height: auto;
}

.ep-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ep-space-4) var(--ep-space-3);
}

.ep-legend__item {
    display: flex;
    align-items: center;
    gap: var(--ep-space-3);
    font-size: 12px;
    color: var(--ep-text-neutral);
}

.ep-legend__swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* range chart */
.ep-range {
    display: flex;
    flex-direction: column;
    gap: var(--ep-space-5);
}

.ep-range__row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: var(--ep-space-4);
}

.ep-range__label {
    font-size: 12px;
    color: var(--ep-text-neutral);
}

.ep-range__track {
    position: relative;
    height: 36px;
    border: 1px solid var(--ep-border);
    border-radius: 6px;
    background:
        repeating-linear-gradient(to right, transparent 0 calc(100% / 16 - 1px), var(--ep-border) calc(100% / 16 - 1px) calc(100% / 16));
}

.ep-range__marker {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--ep-brand);
}

.ep-range__scale {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--ep-text-muted);
    padding-left: 136px;
}

/* tabs */
.ep-tabs {
    display: flex;
    gap: var(--ep-space-6);
    border-bottom: 1px solid var(--ep-border);
}

.ep-tab {
    background: none;
    border: 0;
    padding: 12px 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ep-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.ep-tab--active {
    color: var(--ep-brand);
    border-bottom-color: var(--ep-brand);
}

/* disclosure rows */
.ep-disclosure {
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius-sm);
    overflow: hidden;
}

.ep-disclosure__head {
    display: flex;
    align-items: center;
    gap: var(--ep-space-4);
    width: 100%;
    padding: 12px var(--ep-space-5);
    background: var(--ep-surface);
    border: 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--ep-text);
    cursor: pointer;
}

.ep-disclosure__body {
    padding: var(--ep-space-5);
    border-top: 1px solid var(--ep-border);
    font-size: 14px;
    line-height: 22px;
    color: var(--ep-text-neutral);
}

.ep-disclosure__body ul {
    margin: 0;
    padding-left: 18px;
}

.ep-disclosure__body li + li {
    margin-top: var(--ep-space-3);
}

.ep-bullet-warn {
    display: flex;
    gap: var(--ep-space-3);
    align-items: center;
    font-size: 14px;
    color: var(--ep-text-neutral);
}

.ep-bullet-warn__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1495b;
    flex-shrink: 0;
}

.ep-divider {
    height: 1px;
    background: var(--ep-border);
    border: 0;
    margin: 0;
}

/* Overlay used on the welcome screen */
.ep-modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--ep-overlay);
    display: flex;
    align-items: stretch;
    justify-content: center;
    z-index: 20;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.ep-row-end {
    display: flex;
    justify-content: flex-end;
}

.ep-stack {
    display: flex;
    flex-direction: column;
    gap: var(--ep-space-5);
}

.ep-stack--tight {
    gap: var(--ep-space-4);
}

.ep-screen--center {
    text-align: center;
    align-items: center;
}

.ep-screen--center .ep-body {
    text-align: center;
}

.ep-question {
    display: flex;
    gap: var(--ep-space-3);
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: var(--ep-text);
    padding: 0 var(--ep-space-1);
}

.ep-question__num {
    color: var(--ep-text);
}

.ep-selection-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ep-text);
    margin: 0 0 var(--ep-space-4);
}

/* Teaser content that is visually locked behind the active questionnaire */
.ep-locked {
    filter: blur(4px);
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.ep-eyebrow {
    font-size: 12px;
    font-weight: 500;
    color: var(--ep-text-muted);
    margin: 0 0 var(--ep-space-2);
}

.ep-tile__meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ep-text-muted);
    margin-bottom: var(--ep-space-3);
}

.ep-tile__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ep-text);
}

.ep-tile--stacked {
    flex-direction: column;
    align-items: stretch;
    gap: var(--ep-space-4);
}

.ep-tile--stacked .ep-tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ep-space-4);
}
