/* Only opted-in home views use these styles. */
body.grouped-home {
  --grouped-art-width: 100vw;
  background: #fff;
  min-height: 100vh;
  height: auto;
  font-family: Arial, sans-serif;
  position: relative;
}

body.grouped-home > .container { display: none; }
body.grouped-home #disclaimer { display: none; }
#grouped_home[hidden] { display: none; }

body.grouped-home::before,
body.grouped-home::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 100 / 149;
  pointer-events: none;
}

body.grouped-home::before {
  background: linear-gradient(rgba(44, 99, 58, .94), rgba(44, 99, 58, .94)), url("../img/home_background.png") top center / 100% auto no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 50% 100%, 0 74%);
}

body.grouped-home::after {
  background: #d2e2d9;
  clip-path: polygon(35% 0, 100% 0, 100% 19.5%, 86% 27%);
}

.grouped-home .grouped-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  min-height: 100vh;
  min-height: max(100svh, calc(var(--grouped-art-width) * 1.49 + 110px));
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 18px max(32px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.grouped-home .grouped-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}

.grouped-home .grouped-toolbar-right { display: flex; gap: 18px; margin-left: auto; }
.grouped-home .grouped-action {
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.grouped-home .grouped-action svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.grouped-home .grouped-title {
  color: #fff;
  font-weight: 700;
  font-size: clamp(27px, 6.8vw, 46px);
  line-height: 1.22;
  text-align: center;
  margin: 40px 0 28px;
}

.grouped-home .grouped-content { display: flex; flex-direction: column; gap: 10px; }
.grouped-home .grouped-title-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .45);
}
.grouped-home .grouped-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e9e7e5;
  border-radius: 42px;
  padding: 8px 22px 8px 32px;
  min-height: 64px;
  color: #000;
  text-decoration: none;
}

.grouped-home .grouped-card:hover { color: #000; text-decoration: none; border-color: #b8b5b1; }
.grouped-home .grouped-card:focus-visible,
.grouped-home .grouped-action:focus-visible { outline: 3px solid #94d501; outline-offset: 4px; }
.grouped-home .grouped-card-body { flex: 1; min-width: 0; }
.grouped-home .grouped-card-title {
  font-size: clamp(19px, 4.8vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 4px;
  text-align: left;
  overflow-wrap: anywhere;
}

.grouped-home .grouped-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; line-height: 1.2; }
.grouped-home .grouped-progress,
.grouped-home .grouped-result-label { color: #9d9993; font-weight: 700; }
.grouped-home .grouped-progress { font-size: clamp(13px, 3.6vw, 21px); }
.grouped-home .grouped-progress.has-results { color: #45413d; }
.grouped-home .grouped-count {
  font-size: clamp(12px, 3.2vw, 18px);
  font-weight: 700;
  background: #e6e3e0;
  border-radius: 30px;
  padding: 2px 10px;
  white-space: nowrap;
}

.grouped-home .grouped-chevron { width: 10px; height: 10px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); flex-shrink: 0; }
.grouped-home .grouped-disease-label {
  align-self: center;
  margin: 8px 0 8px;
  padding: 7px 10px;
  border-radius: 30px;
  background: #94d501;
  color: #000;
  font-size: clamp(15px, 3.6vw, 24px);
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

.grouped-home .grouped-list { gap: 6px; }
.grouped-home .grouped-calculator { min-height: 68px; padding-top: 9px; padding-bottom: 9px; }
.grouped-home .grouped-calculator .grouped-card-title { font-size: clamp(22px, 5.4vw, 34px); }
.grouped-home .grouped-card-description { font-size: clamp(14px, 3.6vw, 21px); line-height: 1.25; }
.grouped-home .grouped-result-label.black { color: #000; }
.grouped-home .grouped-result-label.leve { color: #73a207; }
.grouped-home .grouped-result-label.moderado { color: #ff9e00; }
.grouped-home .grouped-result-label.grave { color: #fe0000; }
.grouped-home .grouped-result-label.muy-grave { color: #b40000; }
.grouped-home .grouped-score { font-size: clamp(24px, 6vw, 36px); font-weight: 700; flex-shrink: 0; }
.grouped-home .grouped-footer { margin-top: 0; padding: 20px 20px 8px; }
.grouped-home .grouped-logos { display: flex; align-items: center; justify-content: space-around; gap: 30px; }
.grouped-home .grouped-logo { display: block; max-width: 45%; height: auto; }
.grouped-home .grouped-logos-shadow .grouped-logo {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .95)) drop-shadow(0 0 5px rgba(255, 255, 255, .85));
}
.grouped-home .grouped-logo.sanofi { width: 95px; }
.grouped-home .grouped-logo.regeneron { width: 132px; }
.grouped-home .grouped-job-code { text-align: center; margin: 22px 0 0; }

@media (min-width: 768px) {
  .grouped-home .grouped-shell { padding-top: 30px; padding-bottom: 40px; }
  .grouped-home .grouped-title { margin: 45px 0 36px; }
  .grouped-home .grouped-card { min-height: 92px; padding: 16px 34px 16px 44px; border-radius: 60px; }
  .grouped-home .grouped-content { gap: 14px; }
  .grouped-home .grouped-count { padding: 3px 16px; }
  .grouped-home .grouped-disease-label { margin-bottom: 12px; }
}

@media (max-width: 359px) {
  .grouped-home .grouped-shell { padding-left: 12px; padding-right: 12px; }
  .grouped-home .grouped-card { padding-left: 22px; padding-right: 18px; }
  .grouped-home .grouped-summary { gap: 4px; }
}

/* Denmark uses the existing standard country background and a black title. */
body.grouped-home-standard::before {
  /* Match the asset's 563 × 1001 dimensions, including its white footer. */
  aspect-ratio: 563 / 1001;
  background: url("../img/home_background.png") top center / 100% auto no-repeat;
  clip-path: none;
}
body.grouped-home-standard::after { display: none; }
.grouped-home-standard .grouped-title { color: #000; }
.grouped-home-standard .grouped-title-shadow {
  text-shadow: 0 0 3px rgba(255, 255, 255, .95), 0 0 6px rgba(255, 255, 255, .8);
}
.grouped-home-standard .grouped-shell {
  min-height: max(100svh, calc(var(--grouped-art-width) * 1001 / 563));
}
