@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/almarai-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/almarai-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/almarai-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/almarai-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --mew-navy: #002475;
  --mew-navy-2: #0e1d61;
  --mew-blue: #023dc3;
  --mew-cyan: #00c8e0;
  --mew-bg: #f4f4f4;
  --mew-surface: #ffffff;
  --mew-line: #e3e6ee;
  --mew-muted: #5a5a5a;
  --mew-ink: #0e1d61;
  --mew-alert: #ea4158;
  --band-weak: #b42318;
  --band-mid: #c4320a;
  --band-good: #d4a017;
  --band-excellent: #067647;
  --menu-grad: linear-gradient(90deg, #00c8e0, #023dc3);
  --shadow: 0 2px 12px rgba(2, 45, 147, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Almarai", sans-serif;
  color: var(--mew-ink);
  background: var(--mew-bg);
  line-height: 1.55;
}
a { color: var(--mew-blue); text-decoration: none; }
a:hover { color: var(--mew-cyan); }
button, input, select, textarea { font-family: inherit; }

.site-header { background: var(--mew-surface); box-shadow: var(--shadow); }
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 3px solid var(--mew-line);
}
.header-top__cluster {
  display: flex;
  align-items: center;
  gap: 14px 20px;
  flex: 1;
  min-width: 0;
}
.header-mew-logo {
  display: block;
  height: clamp(44px, 6vw, 58px);
  width: auto;
  max-width: min(380px, 52vw);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}
.brand { text-decoration: none; color: var(--mew-navy); min-width: 0; }
.brand-title { display: block; font-weight: 700; font-size: 1.2rem; }
.brand small { display: block; font-weight: 400; color: var(--mew-muted); font-size: .78rem; margin-top: 2px; }
.nav-toggle {
  display: none;
  background: var(--mew-blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
}
.nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 8px 14px;
  padding: 10px 18px;
  background: var(--menu-grad);
}
.nav-bar a {
  white-space: nowrap;
}
.nav-bar a, .nav-bar button {
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 4px 0;
  font-size: .92rem;
  font-weight: 700;
}
.nav-bar a:hover, .nav-bar button:hover { opacity: .9; }
.nav-bar a.nav-survey {
  background: #fff;
  color: var(--mew-blue);
  border-radius: 8px;
  padding: 6px 14px;
}
.nav-bar a.nav-survey:hover { color: var(--mew-navy); opacity: 1; }
.nav-help { position: relative; }
.nav-help summary {
  cursor: pointer;
  list-style: none;
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  white-space: nowrap;
}
.nav-help summary::-webkit-details-marker { display: none; }
.nav-help__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  inset-inline-start: 0;
  width: min(320px, 84vw);
  margin: 0;
  padding: 14px 16px 12px;
  background: #fff;
  color: var(--mew-navy);
  border-radius: 12px;
  border-top: 3px solid var(--mew-blue);
  box-shadow: var(--shadow);
}
.nav-help__panel strong { display: block; font-size: .95rem; margin-bottom: 4px; }
.nav-help__panel p { margin: 0 0 10px; font-size: .88rem; line-height: 1.6; color: var(--mew-muted); }
.nav-help__panel a {
  display: inline-block;
  color: var(--mew-blue);
  font-weight: 700;
  font-size: .92rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eef3fb;
}
.who { color: rgba(255,255,255,.92); font-size: .88rem; font-weight: 400; margin-inline-start: auto; }
.logout-form { margin: 0; }

.wrap { width: min(1180px, calc(100% - 20px)); margin: 16px auto 36px; }
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.page-head__survey {
  flex-shrink: 0;
  font-weight: 700;
  min-height: 44px;
  padding-inline: 18px;
}
.page-head h1 { margin: 0 0 4px; color: var(--mew-navy-2); font-size: 1.5rem; }
.panel h2, .panel h3 { color: var(--mew-navy-2); }
.muted { color: var(--mew-muted); }
.panel, .q-card, .kpi, .sector-card, .qr-card {
  background: var(--mew-surface);
  border: 1px solid var(--mew-line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.panel { padding: 16px; margin-bottom: 14px; }
.q-card { padding: 0; margin-bottom: 16px; overflow: hidden; }
.q-card__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  background: linear-gradient(180deg, #f5f8fc 0%, #fff 55%);
  border-bottom: 1px solid var(--mew-line);
}
.q-card__num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--menu-grad);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(2, 61, 195, 0.2);
}
.q-card__titles { flex: 1; min-width: 0; }
.q-card__weight { display: block; margin: 2px 0 0; font-size: .85rem; font-weight: 700; color: var(--mew-muted); }
.q-card__title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.4;
  color: var(--mew-navy-2);
}
.q-card__desc {
  margin: 6px 0 0;
  font-size: .88rem;
  color: var(--mew-muted);
  line-height: 1.5;
}
.q-card__picked {
  flex-shrink: 0;
  margin-inline-start: auto;
  min-width: 4.5rem;
  text-align: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef1f8;
  color: var(--mew-muted);
  font-weight: 700;
  font-size: .85rem;
  border: 1px solid var(--mew-line);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.q-card__picked.is-weak { background: #fdecea; color: var(--band-weak); border-color: #f5c4be; }
.q-card__picked.is-mid { background: #fff4e8; color: var(--band-mid); border-color: #ffd4b0; }
.q-card__picked.is-good { background: #fff9e6; color: #8a6d0a; border-color: #e8d48a; }
.q-card__picked.is-excellent { background: #e8f6ee; color: var(--band-excellent); border-color: #b8e0c8; }
.q-card.is-answered { border-color: rgba(2, 61, 195, 0.22); box-shadow: 0 3px 14px rgba(2, 45, 147, 0.07); }
.q-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 16px; }
.q-card__score-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--mew-navy);
}
.q-card__bands-hint {
  font-weight: 400;
  font-size: .78rem;
  color: var(--mew-muted);
}
.q-card__notes {
  background: #f7f9fc;
  border: 1px solid var(--mew-line);
  border-radius: 12px;
  padding: 12px 14px 10px;
}
.q-card__notes-label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  color: var(--mew-navy-2);
  margin-bottom: 8px;
}
.q-card__notes-optional { font-weight: 400; color: var(--mew-muted); font-size: .85rem; }
.q-notes-input {
  border: 1px solid #d5dae6;
  border-radius: 10px;
  min-height: 84px;
  resize: vertical;
  background: #fff;
  line-height: 1.55;
  font-size: .95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.q-notes-input::placeholder { color: #9aa3b5; }
.q-notes-input:focus {
  border-color: var(--mew-cyan);
  box-shadow: 0 0 0 3px rgba(0, 200, 224, 0.18);
}
.q-notes-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.q-notes-count { font-size: .78rem; color: var(--mew-muted); }
.survey-form { display: flex; flex-direction: column; gap: 0; }
.survey-general-notes__hint { margin: -4px 0 10px; font-size: .88rem; }

.btn-primary {
  --bs-btn-bg: var(--mew-blue);
  --bs-btn-border-color: var(--mew-blue);
  --bs-btn-hover-bg: #025fce;
  --bs-btn-hover-border-color: #025fce;
}
.btn-outline-secondary {
  --bs-btn-color: var(--mew-blue);
  --bs-btn-border-color: var(--mew-blue);
  --bs-btn-hover-bg: var(--mew-blue);
  --bs-btn-hover-color: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--mew-cyan);
  box-shadow: 0 0 0 0.2rem rgba(0, 200, 224, 0.25);
}

.filters-panel {
  background: var(--mew-surface);
  border: 1px solid var(--mew-line);
  border-radius: 12px;
  padding: 0 14px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.filters-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--mew-navy);
  padding: 12px 0;
  list-style: none;
}
.filters-panel summary::-webkit-details-marker { display: none; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .85rem;
  color: var(--mew-muted);
  min-width: 120px;
  flex: 1 1 140px;
}
.filters input, .filters select, .form-control, .form-select { min-height: 42px; }

.kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 14px;
  min-width: 0;
}
.kpi-grid > *,
.dash-hero > *,
.dash-split > * {
  min-width: 0;
  max-width: 100%;
}
.kpi { padding: 14px 16px; overflow: hidden; }
.kpi > span { color: var(--mew-muted); font-size: .88rem; display: block; }
.kpi strong { display: block; font-size: 1.65rem; line-height: 1.25; color: var(--mew-navy); }
.kpi strong.score-line { display: inline-flex; }
.score-line {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  max-width: 100%;
}
.kpi strong.time { font-size: 1rem; font-weight: 700; }
.kpi--weak { background: #fdecea; border-color: #f0b4ad; }
.kpi--weak strong, .kpi--weak .overall-gauge__value { color: var(--band-weak); }
.kpi--mid { background: #fff1e8; border-color: #f5c4a8; }
.kpi--mid strong, .kpi--mid .overall-gauge__value { color: var(--band-mid); }
.kpi--good { background: #fff8e6; border-color: #ead48a; }
.kpi--good strong, .kpi--good .overall-gauge__value { color: #8a6d0a; }
.kpi--excellent { background: #e8f6ee; border-color: #b7e0c8; }
.kpi--excellent strong, .kpi--excellent .overall-gauge__value { color: var(--band-excellent); }
.kpi--none { background: #f4f6f8; border-color: #d5dae3; }
.kpi--none strong, .kpi--none .overall-gauge__value { color: #667085; }

.dash-hero {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  margin-bottom: 14px;
  min-width: 0;
}
.overall-gauge { padding: 18px; text-align: center; }
.overall-gauge__value {
  display: flex;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--mew-navy);
  line-height: 1.1;
}
.overall-gauge__value small { font-size: 1rem; color: var(--mew-muted); font-weight: 400; }
.overall-gauge__band { margin: 6px 0 14px; color: var(--mew-muted); font-weight: 700; }
.sector-compare { padding: 16px 18px; }
.sector-compare h2 { margin: 0 0 12px; font-size: 1.1rem; }

.bar-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: #e2e6ef;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(14, 29, 97, 0.08);
}
.bar-track--lg { height: 20px; margin-top: 6px; }
.bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: auto;
  border-radius: 999px;
  max-width: 100%;
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: none;
}
.bar-fill--weak { background: var(--band-weak); }
.bar-fill--mid { background: var(--band-mid); }
.bar-fill--good { background: var(--band-good); }
.bar-fill--excellent { background: var(--band-excellent); }
.bar-fill--none { background: #98a2b3; width: 0 !important; }

.bar-row { margin-bottom: 16px; }
.bar-row__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 1rem;
}
.bar-row__title { font-weight: 700; color: var(--mew-navy-2); flex: 1; min-width: 0; line-height: 1.35; }
.bar-row__weight { display: block; font-weight: 400; font-size: .8rem; color: var(--mew-muted); }
.duty-banner__list { margin: 8px 0 0; padding-inline-start: 1.2rem; }
.week-dots { white-space: normal; }
.week-dots .tag { margin-inline-end: 4px; }
.bar-row__pct { font-weight: 700; color: var(--mew-navy); }
.bar-row__meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: .95rem; }
.bar-row__band { color: var(--mew-navy); font-weight: 700; font-size: 1rem; }
.bar-row__viz { margin-top: 2px; }
.bar-row__scale {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--mew-muted);
  font-weight: 700;
  margin-bottom: 3px;
  padding: 0 2px;
}
.bar-row__notes {
  margin: 8px 0 0;
  font-size: .95rem;
  color: var(--mew-navy-2);
  white-space: pre-wrap;
  line-height: 1.55;
  padding: 8px 12px;
  background: #f4f7fb;
  border-radius: 8px;
  border-inline-start: 3px solid var(--mew-cyan, #00c8e0);
}
.bar-row__notes-label {
  display: block;
  margin-bottom: 2px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--mew-muted);
}
.pill--score,
.score-chip {
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.pill--score {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-width: 4.2rem;
  padding: 5px 12px;
  font-size: 1.1rem;
  gap: 0;
}
.pill__num { font-size: 1.15em; }
.pill__denom { font-size: .78em; opacity: 0.92; font-weight: 700; }

.dash-split {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 14px;
  min-width: 0;
}
.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-list li {
  border-bottom: 1px solid var(--mew-line);
  padding: 12px 0;
  display: grid;
  gap: 4px;
}
.risk-list li:last-child { border-bottom: 0; }
.risk-list__num { color: var(--mew-alert); font-weight: 700; font-size: .85rem; }
.risk-list__title { font-weight: 700; }
.risk-list__meta { font-size: .85rem; color: var(--mew-muted); }
.risk-list__note { font-size: .88rem; color: var(--mew-muted); }

.sector-cards { display: grid; gap: 14px; }
.sector-detail-card__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.sector-detail-card__head h2 { margin: 0; font-size: 1.05rem; }
.sector-detail-card__meta { font-size: .88rem; color: var(--mew-muted); margin-bottom: 10px; }

.chart-box {
  position: relative;
  height: 280px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.chart-box--trend { height: 280px; }
.chart-box canvas {
  display: block;
  max-width: 100% !important;
}
.chart-caption { font-size: .85rem; color: var(--mew-muted); margin-top: 8px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--mew-line); border-radius: 12px; margin-bottom: 14px; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--mew-line); text-align: right; vertical-align: top; }
table.data th { background: #f0f3f3; font-weight: 700; color: var(--mew-navy); }
.notes { white-space: pre-wrap; max-width: 360px; }

.mobile-stack { display: none; }
.stack-card {
  background: var(--mew-surface);
  border: 1px solid var(--mew-line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}

.pill {
  display: inline-flex;
  min-width: 2.2rem;
  justify-content: center;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  font-size: .85rem;
  line-height: 1.2;
}
.pill.weak { background: var(--band-weak); }
.pill.mid { background: var(--band-mid); }
.pill.good { background: var(--band-good); color: #3f3208; }
.pill.excellent { background: var(--band-excellent); }
.pill.none { background: #98a2b3; }
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #e8f6ff;
  color: var(--mew-blue);
  font-size: .82rem;
}
.tag.bad { background: #fde8e6; color: var(--mew-alert); }
.tag.ok { background: #e5f6ec; color: #0d5c32; }

.card-grid, .qr-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.sector-card, .qr-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}
.sector-card:hover { border-color: var(--mew-cyan); }
.qr-card img { width: 160px; height: 160px; align-self: center; }
.qr-note {
  margin: 4px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #e8f6ff;
  color: var(--mew-navy);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.45;
}
.qr-note a { font-weight: 700; }
.qr-url {
  margin: 0;
  width: 100%;
  color: var(--mew-navy);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  user-select: all;
}
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.password-gen { display: flex; gap: 8px; align-items: center; }
.password-gen .form-control { flex: 1; font-weight: 700; letter-spacing: 0.04em; }
.score-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.score-picks input { position: absolute; opacity: 0; pointer-events: none; }
.score-picks label {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--mew-line);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.1s, box-shadow 0.12s, background 0.12s, border-color 0.12s;
}
.score-picks label:hover { border-color: var(--mew-blue); box-shadow: 0 2px 6px rgba(2, 61, 195, 0.12); }
.score-picks input:focus + label { outline: 2px solid var(--mew-cyan); outline-offset: 2px; }
.score-picks input:checked + label { transform: scale(1.04); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12); }
.score-picks input:checked + label.b-weak { background: var(--band-weak); color: #fff; border-color: var(--band-weak); }
.score-picks input:checked + label.b-mid { background: var(--band-mid); color: #fff; border-color: var(--band-mid); }
.score-picks input:checked + label.b-good { background: var(--band-good); color: #3f3208; border-color: var(--band-good); }
.score-picks input:checked + label.b-excellent { background: var(--band-excellent); color: #fff; border-color: var(--band-excellent); }
@media (prefers-reduced-motion: no-preference) {
  .score-picks input:checked + label.is-pop {
    animation: score-pop 0.42s cubic-bezier(0.18, 1.45, 0.36, 1);
  }
}
@keyframes score-pop {
  0% { transform: scale(0.82, 1.18); }
  42% { transform: scale(1.18, 0.88); }
  100% { transform: scale(1.04); }
}
.score-picks--survey {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 12px 10px;
  background: linear-gradient(180deg, #eef2f8 0%, #f6f8fb 100%);
  border: 1px solid var(--mew-line);
  border-radius: 12px;
}
.score-picks--survey label {
  min-width: 0;
  min-height: 46px;
  font-size: .92rem;
  border-radius: 9px;
}
.survey-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--mew-line);
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow);
}
.survey-review {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
}
.survey-review[hidden] { display: none !important; }
.survey-review__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 29, 97, 0.45);
}
.survey-review__panel {
  position: relative;
  width: min(640px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--mew-line);
  box-shadow: 0 16px 48px rgba(2, 45, 147, 0.18);
  padding: 18px 20px 16px;
}
.survey-review__head { margin-bottom: 8px; }
.survey-review__head h2 { margin: 0 0 4px; font-size: 1.25rem; color: var(--mew-navy-2); }
.survey-review__hint { font-size: .88rem; color: var(--mew-muted); margin: 0 0 12px; }
.survey-review__alert { margin-bottom: 12px; font-size: .9rem; }
.survey-review__list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  border: 1px solid var(--mew-line);
  border-radius: 10px;
  max-height: min(42vh, 360px);
  overflow: auto;
}
.survey-review__item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--mew-line);
  display: grid;
  gap: 4px;
}
.survey-review__item:last-child { border-bottom: 0; }
.survey-review__item.is-missing { background: #fff8f6; }
.survey-review__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.survey-review__name { font-weight: 700; color: var(--mew-navy-2); font-size: .92rem; flex: 1; }
.survey-review__note {
  margin: 0;
  font-size: .85rem;
  color: var(--mew-muted);
  white-space: pre-wrap;
  line-height: 1.45;
}
.survey-review__general {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f7f9fc;
  border-radius: 10px;
  border: 1px solid var(--mew-line);
  font-size: .9rem;
}
.survey-review__general-text {
  margin: 6px 0 0;
  white-space: pre-wrap;
  color: var(--mew-muted);
  font-size: .88rem;
}
.survey-review__avg {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(0, 200, 224, 0.08), rgba(2, 61, 195, 0.08));
  border-radius: 10px;
  font-size: .95rem;
}
.survey-review__avg-band { margin-inline-start: 6px; color: var(--mew-muted); font-weight: 700; }
.survey-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid var(--mew-line);
}
.survey-review__missing-tag {
  font-size: .82rem;
  color: var(--mew-alert);
  font-weight: 700;
}
.auth-card {
  width: min(440px, calc(100% - 24px));
  margin: 8vh auto;
  background: #fff;
  border: 1px solid var(--mew-line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.4rem; color: var(--mew-navy); margin-top: 0; }
.auth-card--login {
  width: min(480px, calc(100% - 24px));
  padding-top: 20px;
}
.auth-card__logo {
  display: block;
  width: min(100%, 340px);
  height: auto;
  max-height: 58px;
  object-fit: contain;
  margin: 0 auto 18px;
}
.auth-card--login form {
  margin-top: 0;
}
body.page-login {
  min-height: 100vh;
  background: #f4f7f8;
}
body.page-login .site-header,
body.page-login .site-footer {
  display: none;
}
body.page-login .wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 36px;
}
.login-top {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 28px 10px;
  background: transparent;
}
.login-logo {
  display: block;
  width: min(340px, 72vw);
  height: auto;
  margin: 0;
  object-fit: contain;
}
.login-scene {
  position: relative;
  height: min(42vh, 360px);
  overflow: hidden;
  background: #f7f9fa;
}
.login-wave {
  position: absolute;
  left: 50%;
  top: 18%;
  width: min(120%, 1400px);
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  opacity: 0.9;
}
.login-mark {
  position: absolute;
  left: 50%;
  top: 8px;
  width: min(460px, 78vw);
  height: auto;
  max-height: 100%;
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.login-stage {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100% - 24px));
  margin: -92px auto 0;
  text-align: center;
}
.login-hello {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mew-navy);
  text-align: center;
}
.login-stage h1 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--mew-navy-2);
  text-align: center;
}
.login-lead {
  margin: 8px 0 16px;
  color: var(--mew-muted);
  line-height: 1.6;
  text-align: center;
  font-size: .9rem;
}
.login-stage .auth-card--login {
  margin: 0 auto;
  text-align: start;
  background: #fff;
  box-shadow: 0 10px 30px rgba(14, 29, 97, 0.08);
}
.login-band {
  height: 22px;
  margin-top: 28px;
  background: linear-gradient(90deg, #00c2d8 0%, #0277d8 55%, #023dc3 100%);
}
@media (max-width: 700px) {
  .login-top { padding: 12px 14px 8px; }
  .login-scene { height: 200px; }
  .login-mark { width: min(280px, 70vw); top: 12px; }
  .login-stage { margin-top: -56px; }
}
@media (prefers-reduced-motion: no-preference) {
  .welcome-in {
    animation: welcome-settle 0.72s cubic-bezier(0.18, 1.35, 0.4, 1) both;
  }
  .login-stage .welcome-in:nth-child(2) { animation-delay: 80ms; }
  .login-stage .welcome-in:nth-child(3) { animation-delay: 160ms; }
  .login-stage .welcome-in:nth-child(4) { animation-delay: 240ms; }
  .login-stage .welcome-in:nth-child(5) { animation-delay: 320ms; }
  .auth-card--login button[type="submit"]:active {
    animation: login-press 0.38s cubic-bezier(0.18, 1.45, 0.36, 1);
  }
}
@keyframes welcome-settle {
  from { opacity: 0; transform: translateY(16px); }
  68% { transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@keyframes login-press {
  0% { transform: scale(0.94, 1.06); }
  46% { transform: scale(1.04, 0.96); }
  100% { transform: none; }
}
.site-footer { text-align: center; color: var(--mew-muted); font-size: .85rem; padding: 8px 12px 22px; line-height: 1.7; }
.pager { display: flex; gap: 10px; align-items: center; }
pre.audit { white-space: pre-wrap; background: #f0f3f3; border-radius: 10px; padding: 8px; font-size: .8rem; }

/* Larger dashboard for readability */
body.dashboard-large {
  font-size: 1.08rem;
}
body.dashboard-large .page-head h1 {
  font-size: 1.85rem;
}
body.dashboard-large .kpi strong {
  font-size: 2rem;
}
body.dashboard-large .kpi strong .score-big {
  font-size: 1.15em;
}
body.dashboard-large .kpi span {
  font-size: 1rem;
}
body.dashboard-large .overall-gauge__value {
  font-size: 3.4rem;
}
body.dashboard-large .overall-gauge__band {
  font-size: 1.15rem;
}
body.dashboard-large .bar-track {
  height: 18px;
}
body.dashboard-large .bar-track--lg {
  height: 24px;
}
body.dashboard-large .bar-row__title {
  font-size: 1.08rem;
}
body.dashboard-large .bar-row__band {
  font-size: 1.08rem;
}
body.dashboard-large .pill--score {
  font-size: 1.2rem;
  min-width: 4.8rem;
  padding: 6px 14px;
}
body.dashboard-large .panel h2,
body.dashboard-large .sector-compare h2,
body.dashboard-large .sector-detail-card__head h2 {
  font-size: 1.25rem;
}
body.dashboard-large .risk-list__title {
  font-size: 1.05rem;
}
body.dashboard-large .risk-list__meta,
body.dashboard-large .risk-list__note {
  font-size: .98rem;
}
body.dashboard-large .sector-head-score {
  font-size: 1.05rem;
}
body.dashboard-large .sector-head-score .pill {
  font-size: 1.1rem;
  padding: 5px 12px;
}
body.dashboard-large .chart-box--trend {
  height: 300px;
}

@media (max-width: 991px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-hero, .dash-split { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .header-top__cluster {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
  }
  .header-mew-logo {
    max-width: min(280px, 70vw);
    height: 40px;
  }
  .brand small { font-size: .72rem; }
  .nav-help__panel { position: static; width: auto; margin-top: 6px; }
  .nav-toggle { display: inline-block; }
  .nav-bar { display: none; flex-direction: column; align-items: flex-start; }
  .nav-bar.open { display: flex; }
  .who { margin-inline-start: 0; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head__survey { width: 100%; }
  .survey-bar { flex-wrap: wrap; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi strong { font-size: 1.35rem; }
  .chart-box--trend { height: 220px; }
  .table-desktop { display: none; }
  .mobile-stack { display: block; }
  .score-picks--survey {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 10px;
  }
  .score-picks--survey label {
    flex: none;
    min-width: 0;
    min-height: 52px;
    font-size: 1.25rem;
  }
}

@media (min-width: 768px) {
  .filters-panel summary { display: none; }
  .filters-panel { padding-top: 14px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .bar-row__head { flex-direction: column; align-items: flex-start; }
  .q-card__head { flex-wrap: wrap; }
  .q-card__picked { margin-inline-start: 0; width: 100%; }
  .q-card__bands-hint { display: block; width: 100%; }
}

.sector-head-score { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (prefers-reduced-motion: no-preference) {
  .is-entering {
    animation: settle-in 0.55s cubic-bezier(0.18, 1.35, 0.4, 1) both;
  }
}
@keyframes settle-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.card-pdf-logo { display: none; }
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .print-sheet { width: 180mm; margin: 12mm auto; text-align: center; }
  .print-sheet img { width: 78mm; height: 78mm; }
  body.printing-card .page-head,
  body.printing-card .filters-panel,
  body.printing-card .kpi-grid,
  body.printing-card .dash-hero,
  body.printing-card .dash-split,
  body.printing-card .duty-banner,
  body.printing-card section.panel:not(.is-print) { display: none !important; }
  body.printing-card .sector-detail-card:not(.is-print) { display: none !important; }
  body.printing-card .sector-detail-card.is-print {
    display: block !important;
    box-shadow: none;
    border: 0;
    width: 100%;
  }
  body.printing-card .sector-detail-card.is-print .card-pdf-logo {
    display: block;
    width: min(420px, 100%);
    height: auto;
    margin: 0 auto 14px;
    object-fit: contain;
  }
  body.printing-card .site-footer {
    display: block !important;
    margin-top: 18px;
    color: #334155;
  }
  body.printing-card .footer-credit { display: none !important; }
}