body[data-mapik-view="home"] {
  --home-gutter: clamp(16px, 4vw, 56px);
  --home-surface: #f1f7f8;
  --home-rule: #c5d6da;
}

body[data-mapik-view="home"] .site-header {
  padding: 12px var(--home-gutter);
}

body[data-mapik-view="home"] .brand-mark {
  border-radius: 8px;
  width: 40px;
  height: 40px;
}

.home-start {
  padding: 38px var(--home-gutter) 36px;
  background: var(--home-surface);
  border-color: var(--home-rule);
}

.home-start h1 {
  margin: 0 0 26px;
  color: var(--ink);
  font-size: 2.75rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: 0;
}

.home-entry {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: start;
  gap: 32px;
}

.home-start .home-search {
  margin: 0;
}

.home-search label,
.home-grades h2 {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.home-search .home-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.home-search input[type="search"],
.home-search button {
  min-height: 48px;
  padding: 8px 12px;
}

.home-search button {
  background: #12627a;
}

.home-search button:hover {
  background: #0e4d61;
}

.home-grades ol {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  list-style: none;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.home-grades a {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid #9db8c1;
  border-radius: 6px;
  background: #fff;
  color: #114d61;
  font-weight: 750;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.home-grades a:hover {
  border-color: #12627a;
  background: #deeff3;
}

.home-showcase,
.home-direct,
.home-news {
  max-width: calc(1200px + 2 * var(--home-gutter));
  padding-inline: var(--home-gutter);
}

.home-showcase {
  padding-block: 26px 22px;
}

.home-showcase h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.home-showcase .home-activities {
  gap: 18px;
  margin: 0;
}

.home-showcase .home-activity {
  --activity-tint: #fbf2ed;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--home-rule);
  border-radius: 8px;
  padding: 0;
}

.home-showcase .explore-choice { --activity-tint: #edf5f8; }
.home-showcase .presentation-choice { --activity-tint: #edf5ee; }

.home-showcase .activity-choice {
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 0;
  color: var(--ink);
  border-radius: 8px;
}

.home-showcase .activity-choice > span {
  padding: 12px 14px 0;
}

.home-showcase .activity-choice strong {
  font-size: 1.13rem;
  line-height: 1.25;
}

.home-showcase .activity-choice:hover strong {
  color: var(--blue);
  text-decoration: underline;
}

.home-showcase .activity-choice small {
  margin: 4px 0 0;
  line-height: 1.4;
}

.home-showcase .activity-choice img {
  display: block;
  border-radius: 7px 7px 0 0;
  border-bottom: 1px solid var(--home-rule);
  height: 148px;
  padding: 8px;
  background: var(--activity-tint);
}

.home-showcase .activity-shortcut {
  align-self: flex-start;
  margin: auto 14px 12px;
  padding-top: 8px;
  font-size: .9rem;
}

.home-roles {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-top: 16px;
  border-top: 1px solid var(--home-rule);
  font-size: .95rem;
}

.home-roles-label {
  color: var(--muted);
}

.home-roles a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
}

.home-roles #opetaja { color: #22654b; }
.home-roles #lapsevanem { color: #765400; }

.home-news {
  margin-block: 0;
  border: 0;
  border-top: 1px solid var(--home-rule);
  border-radius: 0;
  background: transparent;
}

@media (max-width: 1040px) {
  .home-entry { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
  .home-grades ol { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .home-showcase .home-activities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .home-entry { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .home-start { padding-block: 23px 10px; }
  .home-start h1 { font-size: 2rem; margin-bottom: 18px; max-width: 20ch; }
  .home-roles { gap: 0 12px; font-size: .875rem; }
  .home-showcase .home-activities { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .home-showcase .activity-choice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    align-items: center;
  }
  .home-showcase .activity-choice > span { padding: 10px 8px 0 12px; }
  .home-showcase .activity-choice img { height: 66px; border: 0; padding: 4px; border-radius: 0 7px 0 0; }
  .home-showcase .activity-shortcut { margin-inline: 12px; }
}

@media (max-width: 360px) {
  .home-search .home-search-row { grid-template-columns: minmax(0, 1fr); }
  .home-search button { justify-self: start; }
  .home-roles-label { flex-basis: 100%; padding-top: 6px; }
}
