/* =============================================================
   Leadership Decision Studio — Stylesheet
   PHB design system. All rules scoped to #phb-root for embed safety.
   Hardcoded hex colors. No CSS variables for embed compatibility.
   ============================================================= */

#phb-root,
#phb-root *,
#phb-root *::before,
#phb-root *::after {
    box-sizing: border-box;
}

#phb-root {
    background: #f7f8fa;
    color: #1a1a1a;
    font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    padding: 24px 16px 48px 16px;
    margin: 0 auto;
    max-width: 1200px;
}

body { background: transparent !important; }

#phb-root h1,
#phb-root h2,
#phb-root h3,
#phb-root h4 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: #0d2b4e;
    margin: 0 0 12px 0;
    line-height: 1.25;
    font-weight: 700;
}

#phb-root h1 { font-size: 28px; }
#phb-root h2 { font-size: 22px; }
#phb-root h3 { font-size: 18px; }

#phb-root p { margin: 0 0 12px 0; }

#phb-root .lds-loading {
    text-align: center;
    padding: 80px 20px;
    color: #5a5a5a;
    font-style: italic;
}

/* ---- Header ---- */
.lds-header {
    background: #0d2b4e;
    color: #ffffff;
    padding: 28px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(13, 43, 78, 0.15);
}

.lds-header .lds-eyebrow {
    color: #ba7517;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.lds-header h1 {
    color: #ffffff;
    font-size: 30px;
    margin-bottom: 8px;
}

.lds-header .lds-subtitle {
    color: #cfd8e3;
    font-size: 15px;
    margin: 0;
    max-width: 720px;
}

/* ---- Progress bar ---- */
.lds-progress {
    display: flex;
    gap: 6px;
    margin: 16px 0 24px 0;
    flex-wrap: wrap;
}
.lds-progress-step {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
    background: #e8ebef;
    border-radius: 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #5a5a5a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.2s ease, color 0.2s ease;
}
.lds-progress-step.is-active {
    background: #1d9e75;
    color: #ffffff;
}
.lds-progress-step.is-done {
    background: #0d2b4e;
    color: #ffffff;
}

/* ---- Card / panel ---- */
.lds-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 10px rgba(13, 43, 78, 0.08);
    border: 1px solid #e6e9ee;
    margin-bottom: 18px;
}

.lds-card h2 {
    margin-bottom: 6px;
}
.lds-card .lds-card-sub {
    color: #5a5a5a;
    font-size: 15px;
    margin-bottom: 22px;
}

/* ---- Persona / scenario grid ---- */
.lds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.lds-tile {
    background: #ffffff;
    border: 2px solid #e6e9ee;
    border-radius: 10px;
    padding: 22px 20px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    font-family: inherit;
    color: #1a1a1a;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lds-tile:hover,
.lds-tile:focus {
    border-color: #1d9e75;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 158, 117, 0.18);
    outline: none;
}

.lds-tile.is-selected {
    border-color: #1d9e75;
    background: #f0faf6;
    box-shadow: 0 6px 16px rgba(29, 158, 117, 0.15);
}

.lds-tile-letter {
    display: inline-block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #ba7517;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: #faf2e4;
    text-align: center;
    margin-bottom: 4px;
}

.lds-tile-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #0d2b4e;
}

.lds-tile-sub {
    font-size: 14px;
    color: #5a5a5a;
    line-height: 1.45;
}

/* ---- Question groups ---- */
.lds-question {
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid #eef0f3;
}
.lds-question:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.lds-question-label {
    display: block;
    font-weight: 600;
    color: #0d2b4e;
    margin-bottom: 12px;
    font-size: 16px;
}

.lds-pill-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lds-pill {
    padding: 10px 18px;
    background: #ffffff;
    border: 1.5px solid #d4d8de;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #2a3340;
    transition: all 0.16s ease;
}

.lds-pill:hover { border-color: #1d9e75; color: #0d2b4e; }
.lds-pill.is-selected {
    background: #0d2b4e;
    border-color: #0d2b4e;
    color: #ffffff;
}

.lds-slider-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
}
.lds-slider-wrap input[type="range"] {
    flex: 1;
    accent-color: #1d9e75;
}
.lds-slider-value {
    min-width: 60px;
    text-align: center;
    background: #f0faf6;
    color: #0d2b4e;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* ---- Buttons ---- */
.lds-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.lds-btn {
    padding: 12px 22px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lds-btn-primary {
    background: #1d9e75;
    color: #ffffff;
}
.lds-btn-primary:hover {
    background: #168562;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 158, 117, 0.3);
}

.lds-btn-secondary {
    background: #ffffff;
    color: #0d2b4e;
    border: 1.5px solid #0d2b4e;
}
.lds-btn-secondary:hover {
    background: #f0faf6;
    border-color: #1d9e75;
    color: #0d2b4e;
}

.lds-btn-ghost {
    background: transparent;
    color: #5a5a5a;
    border: none;
    text-decoration: underline;
}
.lds-btn-ghost:hover { color: #0d2b4e; }

.lds-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Framing card ---- */
.lds-framing-hero {
    background: linear-gradient(135deg, #0d2b4e 0%, #1a4374 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 18px;
}
.lds-framing-hero h2 { color: #ffffff; font-size: 26px; margin-bottom: 6px; }
.lds-framing-hero .lds-framing-eyebrow {
    color: #ffd28a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.lds-framing-hero p { color: #cfd8e3; font-size: 16px; max-width: 720px; }

.lds-framing-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 18px;
    margin-bottom: 18px;
}
@media (max-width: 760px) {
    .lds-framing-body { grid-template-columns: 1fr; }
}

.lds-severity-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px;
    border: 1px solid #e6e9ee;
    text-align: center;
}
.lds-severity-card h3 {
    font-size: 13px;
    color: #5a5a5a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 12px;
}
.lds-gauge-wrap {
    position: relative;
    height: 140px;
    margin-bottom: 12px;
}
.lds-gauge-label {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: #0d2b4e;
}

.lds-lever-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px;
    border: 1px solid #e6e9ee;
    border-left: 4px solid #ba7517;
}
.lds-lever-card h3 {
    font-size: 13px;
    color: #ba7517;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 8px;
}
.lds-lever-card p {
    color: #1a1a1a;
    font-size: 15px;
    margin: 0;
}

/* ---- Insights ---- */
.lds-insight {
    background: #ffffff;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-left: 4px solid #1d9e75;
    box-shadow: 0 1px 3px rgba(13, 43, 78, 0.05);
}
.lds-insight.is-high { border-left-color: #c44a3a; }
.lds-insight.is-moderate { border-left-color: #ba7517; }
.lds-insight-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}
.lds-insight.is-high .lds-insight-tag { background: #fde9e6; color: #a8392c; }
.lds-insight.is-moderate .lds-insight-tag { background: #faf2e4; color: #8c5a14; }
.lds-insight-text {
    font-size: 14px;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.55;
}

/* ---- Full plan layout ---- */
.lds-plan-section {
    margin-bottom: 22px;
}
.lds-plan-section h2 {
    border-left: 4px solid #1d9e75;
    padding-left: 12px;
    margin-bottom: 12px;
}

.lds-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 8px;
}
@media (max-width: 900px) { .lds-plan-grid { grid-template-columns: 1fr; } }

.lds-phase {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e6e9ee;
    border-top: 4px solid #0d2b4e;
}
.lds-phase.is-30 { border-top-color: #1d9e75; }
.lds-phase.is-60 { border-top-color: #ba7517; }
.lds-phase.is-90 { border-top-color: #0d2b4e; }
.lds-phase h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #5a5a5a;
    margin-bottom: 14px;
}

.lds-phase ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lds-phase li {
    padding: 10px 0 10px 22px;
    position: relative;
    font-size: 14px;
    line-height: 1.55;
    border-bottom: 1px dashed #eef0f3;
}
.lds-phase li:last-child { border-bottom: none; }
.lds-phase li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 17px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1d9e75;
}

.lds-callout {
    background: #faf2e4;
    border-left: 4px solid #ba7517;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 14px 0;
}
.lds-callout-title {
    font-weight: 700;
    color: #8c5a14;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.lds-callout p { margin: 0; font-size: 15px; line-height: 1.55; }

.lds-callout.is-trap {
    background: #fdebe6;
    border-left-color: #c44a3a;
}
.lds-callout.is-trap .lds-callout-title { color: #a8392c; }

.lds-callout.is-metric {
    background: #f0faf6;
    border-left-color: #1d9e75;
}
.lds-callout.is-metric .lds-callout-title { color: #168562; }

/* ---- Dashboard list ---- */
.lds-dashlist {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e6e9ee;
    overflow: hidden;
}
.lds-dashlist-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #eef0f3;
    text-decoration: none;
    color: inherit;
    transition: background 0.16s ease;
}
.lds-dashlist-item:last-child { border-bottom: none; }
.lds-dashlist-item:hover {
    background: #f0faf6;
}
.lds-dashlist-num {
    background: #0d2b4e;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    text-align: center;
    line-height: 26px;
    font-weight: 700;
    font-size: 13px;
    margin-right: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}
.lds-dashlist-body { flex: 1; }
.lds-dashlist-title {
    font-weight: 700;
    color: #0d2b4e;
    margin: 0 0 2px 0;
    font-size: 15px;
}
.lds-dashlist-note {
    color: #5a5a5a;
    font-size: 13px;
    margin: 0;
    line-height: 1.45;
}
.lds-dashlist-arrow {
    color: #1d9e75;
    font-size: 18px;
    margin-left: 12px;
    flex-shrink: 0;
}

/* ---- Escalation list ---- */
.lds-escalation {
    background: #fdebe6;
    border-radius: 10px;
    padding: 18px 22px;
    border-left: 4px solid #c44a3a;
}
.lds-escalation h3 {
    color: #a8392c;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 10px;
}
.lds-escalation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lds-escalation li {
    padding: 6px 0 6px 22px;
    position: relative;
    font-size: 14px;
    color: #1a1a1a;
}
.lds-escalation li::before {
    content: "!";
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: #c44a3a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
}

/* ---- Print styles ---- */
@media print {
    body { background: #ffffff !important; }
    #phb-root {
        max-width: 100%;
        padding: 0;
        background: #ffffff;
    }
    .lds-progress,
    .lds-actions,
    .lds-no-print { display: none !important; }
    .lds-card,
    .lds-phase,
    .lds-dashlist,
    .lds-escalation,
    .lds-framing-hero,
    .lds-severity-card,
    .lds-lever-card {
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    .lds-plan-grid { grid-template-columns: repeat(3, 1fr); }
    a { color: #0d2b4e !important; text-decoration: none; }
}

/* ---- Footer disclaimer ---- */
.lds-footer {
    margin-top: 28px;
    padding: 18px 22px;
    background: #f0f2f5;
    border-radius: 8px;
    color: #5a5a5a;
    font-size: 13px;
    line-height: 1.55;
    border-left: 3px solid #1d9e75;
}
.lds-footer strong { color: #0d2b4e; }

/* ---- Selected response summary chips ---- */
.lds-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.lds-summary-chip {
    background: #ffffff;
    border: 1px solid #d4d8de;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: #2a3340;
}
.lds-summary-chip strong {
    color: #0d2b4e;
    margin-right: 6px;
}
