/* =============================================================
   kydav_style_light.css — KYDAV Light Theme
   Option B palette: cream / ink / gold / teal
   Replaces kydav_style.css for all user-facing pages
   ============================================================= */

/* ── Google Fonts loaded via PHP <head> — do not import here ── */

:root {
  /* Colour palette */
  --ink:          #0f1923;
  --ink-mid:      #1e2d3d;
  --ink-light:    #2e4057;
  --cream:        #faf8f4;
  --cream-mid:    #f0ece3;
  --cream-dark:   #e4ddd1;
  --gold:         #c8922a;
  --gold-light:   #e8b84b;
  --gold-pale:    #fdf6e9;
  --teal:         #1a7a6e;
  --teal-light:   #2a9d8f;
  --teal-pale:    #e8f5f3;
  --danger:       #c0392b;
  --danger-pale:  #fdf0ee;
  --success:      #1a7a6e;
  --success-pale: #e8f5f3;
  --border:       #e0d8cc;
  --shadow:       rgba(15,25,35,0.08);

  /* Legacy variable aliases — keeps existing code working */
  --navy:         var(--ink);
  --navy-mid:     var(--ink-mid);
  --navy-light:   var(--ink-light);
  --white:        var(--cream);
  --text:         var(--ink);
  --muted:        var(--ink-light);
  --accent:       var(--teal);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Navigation ── */
.kydav-nav, nav.kydav-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 60px;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-brand, .kydav-nav .nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #faf8f4;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-brand span { color: var(--gold-light); }
.nav-logo { font-family: var(--font-display); font-size: 1.25rem; color: #faf8f4; text-decoration: none; }
.nav-logo span { color: var(--gold-light); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.nav-links a, .nav-link {
  color: rgba(250,248,244,0.55);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-link:hover { color: #faf8f4; }
.nav-cta {
  background: var(--gold) !important;
  color: var(--ink) !important;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }
.nav-spacer { flex: 1; }
.nav-logout { color: rgba(250,248,244,0.4) !important; }
.nav-logout:hover { color: var(--danger) !important; }

/* Dropdown nav */
.nav-dropdown { position: relative; }
.dropbtn {
  background: none;
  border: none;
  color: rgba(250,248,244,0.55);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
  transition: color 0.2s;
}
.dropbtn:hover { color: #faf8f4; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem;
  min-width: 240px;
  box-shadow: 0 8px 24px var(--shadow);
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-light);
  text-decoration: none;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.dropdown-menu a:hover {
  background: var(--cream-mid);
  color: var(--ink);
  border-left-color: var(--gold);
}

/* ── Page wrapper ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* ── User bar ── */
.user-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px var(--shadow);
}
.user-bar-item { display: flex; flex-direction: column; gap: 2px; }
.user-bar-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
}
.user-bar-value { font-size: 0.875rem; color: var(--ink); font-weight: 500; }
.user-bar-company { font-size: 0.875rem; color: var(--gold); font-weight: 600; }
.user-bar-sep { width: 1px; height: 32px; background: var(--border); }

/* ── Section labels + headings ── */
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.page-title em { color: var(--gold); font-style: italic; }
.page-subtitle {
  font-size: 1rem;
  color: var(--ink-light);
  line-height: 1.75;
  max-width: 620px;
  margin-bottom: 2rem;
  font-weight: 300;
}

/* ── Buttons ── */
.btn-primary, .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  color: white;
  border: none;
  border-radius: 7px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(200,146,42,0.25);
}
.btn-primary:hover, .btn-link:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover { background: var(--cream-mid); border-color: var(--ink-light); }

/* ── Form elements ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,146,42,0.1);
}

/* ── Alerts ── */
.alert, .error-msg {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}
.alert.success, .alert-success {
  background: var(--teal-pale);
  border: 1px solid rgba(26,122,110,0.25);
  color: var(--teal);
}
.alert.error, .alert-error, .error-msg {
  background: var(--danger-pale);
  border: 1px solid rgba(192,57,43,0.25);
  color: var(--danger);
}

/* ── Cards ── */
.card, .solution-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 4px 16px var(--shadow); }

/* ── Risk badges ── */
.risk-red    { background: var(--danger-pale); color: var(--danger); border: 1px solid rgba(192,57,43,0.2); }
.risk-yellow { background: var(--gold-pale);   color: var(--gold);   border: 1px solid rgba(200,146,42,0.2); }
.risk-green  { background: var(--teal-pale);   color: var(--teal);   border: 1px solid rgba(26,122,110,0.2); }
.risk-grey   { background: var(--cream-mid);   color: var(--ink-light); border: 1px solid var(--border); }

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

/* ── Assessment scale (questionnaire answer options) ── */
.answer-option { display: none; }
.answer-label {
  display: block;
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--ink-light);
  font-weight: 500;
  transition: all 0.15s;
  line-height: 1.3;
}
.answer-label:hover { border-color: var(--gold); background: var(--gold-pale); color: var(--ink); }
.answer-option:checked + .answer-label {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(200,146,42,0.3);
}
.al-na { }
.answer-option:checked + .al-na {
  background: var(--cream-dark);
  border-color: var(--cream-dark);
  color: var(--ink-light);
  box-shadow: none;
}

/* ── Question cards ── */
.question-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 4px var(--shadow);
}
.question-card .q-number {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.question-card .q-dimension {
  font-size: 0.7rem;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.question-card .q-text {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

/* ── Scale grid ── */
.scale-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--ink-light);
  margin-top: 0.25rem;
}

/* ── Progress bar ── */
.progress-bar {
  height: 4px;
  background: var(--cream-dark);
  border-radius: 2px;
  margin-bottom: 2rem;
}
.progress-fill {
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s;
}

/* ── Piechart / report page ── */
.report-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.exec-banner {
  background: var(--ink);
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 2rem;
  color: #faf8f4;
  position: relative;
  overflow: hidden;
}
.exec-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}
.exec-banner .exec-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #faf8f4;
  margin-bottom: 0.5rem;
}
.exec-banner .exec-sub {
  font-size: 0.875rem;
  color: rgba(250,248,244,0.6);
  line-height: 1.7;
}

/* Report cards */
.report-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px var(--shadow);
}
.report-card-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1.25rem;
}

/* ── Horizontal bar chart ── */
.bar-chart-wrap { padding: 0.5rem 0; }
.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.bar-row:hover { background: var(--cream-mid); border-color: var(--border); }
.bar-row.active { background: var(--gold-pale); border-color: rgba(200,146,42,0.3); }
.bar-dim-name {
  width: 160px;
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}
.bar-track {
  flex: 1;
  height: 12px;
  background: var(--cream-dark);
  border-radius: 6px;
  overflow: hidden;
}
.bar-fill {
  height: 12px;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}
.bar-fill.high   { background: var(--danger); }
.bar-fill.medium { background: var(--gold); }
.bar-fill.low    { background: var(--teal); }
.bar-pct {
  width: 36px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--ink-light);
  font-weight: 600;
  flex-shrink: 0;
}
.bar-badge {
  width: 80px;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  text-align: center;
  letter-spacing: 0.04em;
}

/* Drilldown panel */
.drilldown-panel {
  background: var(--cream-mid);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  display: none;
}
.drilldown-panel.open { display: block; }
.drilldown-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.drilldown-questions { display: flex; flex-direction: column; gap: 0.5rem; }
.dq-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.5;
}
.dq-score {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: 1px;
}
.dq-score.high   { background: var(--danger-pale); color: var(--danger); }
.dq-score.medium { background: var(--gold-pale);   color: var(--gold); }
.dq-score.low    { background: var(--teal-pale);   color: var(--teal); }
.dq-text { color: var(--ink-light); font-size: 0.8rem; }
.dq-next {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 500;
}
.dq-next::before { content: '→ '; }

/* ── Maturity bar ── */
.maturity-bar-wrap { margin: 1.5rem 0; }
.maturity-track {
  display: flex;
  gap: 3px;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.maturity-segment {
  flex: 1;
  transition: opacity 0.2s;
}
.maturity-segment.active { opacity: 1; }
.maturity-segment.inactive { opacity: 0.2; }
.maturity-labels-row {
  display: flex;
  gap: 3px;
  font-size: 0.62rem;
  color: var(--ink-light);
}
.maturity-labels-row span { flex: 1; text-align: center; }

/* ── Summary stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: center;
  box-shadow: 0 1px 4px var(--shadow);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold);
  display: block;
  line-height: 1.1;
}
.stat-label {
  font-size: 0.68rem;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 0.2rem;
}

/* ── Report links grid (thankyou page) ── */
.report-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.report-link-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 1px 4px var(--shadow);
}
.report-link-card::before {
  content: '';
  display: block;
  height: 2px;
  margin: -1.25rem -1.5rem 0.75rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 12px 12px 0 0;
}
.report-link-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow);
}
.rlc-icon  { font-size: 1.5rem; }
.rlc-title { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.rlc-sub   { font-size: 0.775rem; color: var(--ink-light); line-height: 1.5; }

/* ── Footer ── */
.report-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-light);
}

/* ── Lang switcher ── */
.lang-switcher a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-light);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border: 1.5px solid rgba(200,146,42,0.5);
  border-radius: 100px;
  background: rgba(200,146,42,0.1);
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.lang-switcher a:hover {
  color: #fff;
  border-color: var(--gold-light);
  background: rgba(200,146,42,0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .kydav-nav { padding: 0 1.25rem; }
  .page-wrap, .report-wrap { padding: 1.5rem 1.25rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .bar-dim-name { width: 110px; font-size: 0.72rem; }
  .bar-badge { display: none; }
  .nav-links { gap: 0.75rem; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .user-bar { flex-wrap: wrap; gap: 0.75rem; }
  .user-bar-sep { display: none; }
}

/* ── Print ── */
@media print {
  .kydav-nav { display: none; }
  .drilldown-panel { display: block !important; }
  .bar-row:hover { background: none; }
  body { background: white; }
}


/* ── Gold header banner (shared) ─────────────────────────────────────────── */
.kydav-banner {
  background: linear-gradient(135deg, var(--gold) 0%, #b87e1a 100%);
  border: 1px solid var(--gold-pale);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.kydav-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}
.kydav-banner .section-label { color: rgba(255,255,255,0.8) !important; }
.kydav-banner h1,
.kydav-banner .page-title { color: #fff !important; margin-bottom: 0.25rem; }
/* Any paragraph sub-text inside the banner reads as translucent white */
.kydav-banner .page-sub,
.kydav-banner > p,
.kydav-banner .banner-sub { color: rgba(255,255,255,0.85) !important; margin-bottom: 0 !important; }
.kydav-banner .page-title span { color: rgba(255,255,255,0.75) !important; }
