:root {
  --bg: #f4f4ef;
  --surface: #ffffff;
  --surface-soft: #fafbf7;
  --ink: #1d2630;
  --muted: #5f6d79;
  --line: #e1e4de;
  --brand: #1459c7;
  --brand-deep: #103a86;
  --accent: #e4efff;
  --sand: #ffe7c5;
  --green: #dcf7e8;
  --coral: #ffd8cc;
  --shadow: 0 18px 45px rgba(25, 35, 34, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(20, 89, 199, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 24%),
    linear-gradient(180deg, #f7f7f2 0%, #eff2ea 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-shell {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.login-brand,
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.login-brand {
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(20, 89, 199, 0.10), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #fbfdf9 100%);
  padding: 34px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.login-brand h1,
.login-card h2 {
  font-family: "Source Serif 4", serif;
  letter-spacing: -0.03em;
}

.login-brand h1 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  margin: 8px 0 12px;
}

.login-brand p:last-child {
  max-width: 42ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.brand-mark.large {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 1.2rem;
}

.login-card {
  padding: 30px;
  display: grid;
  gap: 20px;
  align-content: center;
}

.login-card h2 {
  font-size: 2rem;
  margin: 8px 0 10px;
}

.login-grid {
  display: grid;
  gap: 16px;
}

.login-actions {
  display: grid;
  gap: 10px;
}

.login-footnote {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, #103a86 0%, #1459c7 100%);
  color: #f7fbff;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-block {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd166 0%, #fff1c2 100%);
  color: #103a86;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.sidebar h1,
.topbar h2,
.hero h3,
.section-head h3,
.card h4,
.public-head h4 {
  font-family: "Source Serif 4", serif;
}

.sidebar h1 {
  font-size: 2rem;
  margin: 6px 0 10px;
  letter-spacing: -0.02em;
}

.sidebar-copy,
.status-card small {
  color: rgba(247, 251, 255, 0.76);
  line-height: 1.5;
}

.nav-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(247, 251, 255, 0.68);
}

.nav {
  display: grid;
  gap: 8px;
}

.modules-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modules-nav .nav-item.active .nav-icon,
.modules-nav .nav-item:hover .nav-icon {
  color: #ffffff;
}

.nav-kicker {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
  font-weight: 800;
}

.nav-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f7fbff;
  padding: 13px 14px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 209, 102, 0.14);
  border-color: rgba(255, 209, 102, 0.28);
}

.sidebar-foot { margin-top: auto; }

.status-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 0 5px rgba(255, 209, 102, 0.18);
}

.content { padding: 26px; }

.topbar,
.hero,
.card,
.stat-card,
.signal-card,
.user-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topbar {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.topbar h2 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
  line-height: 1.08;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.signal-card,
.user-card {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.workflow-test {
  background: linear-gradient(180deg, #fff4e8 0%, #ffe6cc 100%);
  border-color: #ffd6b0;
  color: #8d4d14;
}

.signal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9fd9d2;
}

.signal.strong { background: #f97316; }

.user-card small,
.muted-text,
.hero p,
.content p,
.content small,
.section-filter {
  color: var(--muted);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e6efff;
  color: var(--brand-deep);
  font-weight: 800;
}

.hero {
  margin-top: 18px;
  padding: 26px;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 22px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.1), transparent 26%),
    radial-gradient(circle at bottom left, rgba(20, 89, 199, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.hero h3 {
  font-size: clamp(1.9rem, 2.8vw, 3rem);
  line-height: 1.06;
  margin: 8px 0 14px;
  max-width: 14ch;
  letter-spacing: -0.025em;
}

.hero p {
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.hero-summary {
  background: linear-gradient(180deg, #fffaf1 0%, #fdf1dc 100%);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.summary-item {
  padding-bottom: 14px;
  border-bottom: 1px solid #f0dcc0;
}

.summary-item:last-child { border-bottom: 0; padding-bottom: 0; }

.summary-item span,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  margin: 0;
  color: #8a9aab;
}

.eyebrow.light { color: rgba(247, 251, 255, 0.7); }

.summary-item strong { display: block; margin-top: 4px; font-size: 1rem; }

.panel { display: none; margin-top: 22px; }
.panel.active { display: block; }

.section-head,
.card-head,
.public-head,
.compact-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.section-head { margin-bottom: 16px; }
.section-head h3,
.card-head h4,
.public-head h4 { margin: 4px 0 0; }

.section-head h3 {
  font-size: 1.6rem;
}

.card-head h4,
.public-head h4 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.stats-grid,
.cards-row,
.two-col,
.form-grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: 1.1fr 0.9fr; margin-top: 18px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.cards-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.responses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card,
.stat-card { padding: 22px; }

.stat-card strong {
  display: block;
  font-size: 2.15rem;
  margin: 8px 0 6px;
}

.accent-blue { background: linear-gradient(180deg, #ffffff 0%, var(--accent) 100%); }
.accent-sand { background: linear-gradient(180deg, #fffdf8 0%, var(--sand) 100%); }
.accent-green { background: linear-gradient(180deg, #fcfffd 0%, var(--green) 100%); }
.accent-coral { background: linear-gradient(180deg, #fffdfc 0%, var(--coral) 100%); }

.score-card { grid-column: span 1; }
.wide-card { grid-column: 1 / -1; }

.score-ring-wrap {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
}

.score-ring {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(#1459c7 0 266deg, #dbe8fb 266deg 360deg);
  display: grid;
  place-items: center;
}

.score-ring::before {
  content: "";
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
}

.score-ring span {
  position: relative;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-deep);
}

.feature-list,
.journey-list {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 9px;
}

.feature-list.spaced { margin-top: 16px; }

.pill,
.table-pill,
.section-filter {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1459c7;
  font-size: 0.82rem;
  font-weight: 700;
}

.pill.soft,
.table-pill.muted,
.section-filter {
  background: #fff1e6;
  color: #677788;
}

.bar-group {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 0.92rem;
}

.bar {
  height: 12px;
  background: #e7ece7;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f97316 0%, #1459c7 100%);
  border-radius: inherit;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 14px 15px;
  background: #fff;
  color: var(--ink);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid #edf2f6;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b99a8;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 15px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn {
  background: var(--brand);
  color: #f8fbff;
}

.secondary-btn {
  background: #fff1df;
  color: #8d4d14;
}

.button-row,
.hero-actions { display: flex; gap: 10px; }

.compact-row {
  margin-top: 14px;
}

.link-box {
  padding: 16px;
  border-radius: 16px;
  background: #effbf8;
  color: #13438a;
  word-break: break-all;
  margin-top: 14px;
  font-weight: 600;
}

.link-anchor {
  display: block;
  text-decoration: none;
}

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

.qr-grid {
  width: 170px;
  height: 170px;
  background:
    linear-gradient(90deg, transparent 10px, #1459c7 10px, #1459c7 20px, transparent 20px),
    linear-gradient(transparent 10px, #1459c7 10px, #1459c7 20px, transparent 20px),
    linear-gradient(90deg, #1459c7 0 12px, transparent 12px 24px, #1459c7 24px 36px, transparent 36px 48px, #1459c7 48px 60px, transparent 60px),
    linear-gradient(#1459c7 0 12px, transparent 12px 24px, #1459c7 24px 36px, transparent 36px 48px, #1459c7 48px 60px, transparent 60px),
    #fff;
  border: 10px solid #fff;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.qr-card {
  display: grid;
  place-items: center;
}

.timeline-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.timeline-steps div {
  padding: 14px;
  border-radius: 18px;
  background: #f3faf8;
  display: grid;
  gap: 8px;
}

.timeline-steps strong {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #dff4ef;
  color: var(--brand-deep);
}

.sector-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.sector-list div {
  padding: 14px;
  border-radius: 16px;
  background: #f8fbf7;
  display: flex;
  justify-content: space-between;
}

.feature-card { display: grid; gap: 8px; }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff1df;
  color: var(--brand-deep);
  font-weight: 800;
}

.research-layout { grid-template-columns: 1.1fr 0.9fr; }
.research-layout .wide-card { grid-column: 1 / -1; }

.public-card { max-width: 820px; }

.question-block { margin-top: 18px; }

.scale-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.scale-row button {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.scale-row button.selected {
  background: var(--brand);
  color: #fff;
}

.wide { width: 100%; margin-top: 20px; }

.public-page {
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(20, 89, 199, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 24%),
    linear-gradient(180deg, #f7f7f2 0%, #eff2ea 100%);
}

.public-wrapper {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.public-banner,
.public-form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.public-banner {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.public-banner h1,
.public-form-card h2 {
  font-family: "Source Serif 4", serif;
  letter-spacing: -0.03em;
}

.public-banner h1 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 3vw, 3rem);
}

.public-form-card {
  padding: 28px;
}

.public-form-card h2 {
  margin: 8px 0 0;
  font-size: 1.9rem;
}

.back-btn {
  text-decoration: none;
}

.public-actions {
  margin-top: 18px;
}

.submission-feedback {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ecf7ef;
  color: #2b6b3f;
  font-weight: 600;
}

@media (max-width: 1160px) {
  .login-shell,
  .shell { grid-template-columns: 1fr; }
  .stats-grid,
  .dashboard-grid,
  .cards-row,
  .two-col,
  .form-grid,
  .research-layout,
  .timeline-steps,
  .responses-grid,
  .hero { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .content { padding: 16px; }
  .login-screen { padding: 16px; }
  .public-page { padding: 16px; }
  .topbar,
  .hero,
  .public-banner,
  .section-head,
  .card-head,
  .public-head,
  .hero-actions,
  .button-row,
  .topbar-actions { display: grid; }
  .stats-grid,
  .dashboard-grid,
  .cards-row,
  .two-col,
  .form-grid,
  .research-layout,
  .timeline-steps,
  .responses-grid,
  .hero,
  .login-shell,
  .score-ring-wrap { grid-template-columns: 1fr; }
}
