/* Company and catalog layout. Load after the earlier design layers. */
.ks-founder.ks-wrap {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding-block: 48px;
}
.ks-founder > * { min-width: 0; }
.ks-founder .ks-founder-years {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.ks-founder-years strong {
  display: block;
  flex: none;
  font-size: 104px;
  line-height: .88;
  font-weight: 600;
  letter-spacing: -.065em;
  white-space: nowrap;
}
.ks-founder-years span {
  display: block;
  flex: none;
  font-size: 16px;
  line-height: 1.45;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}
.ks-founder h2 {
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -.04em;
  overflow-wrap: normal;
  text-wrap: balance;
}
.ks-founder p:not(.ks-eyebrow) { margin-top: 14px; }
.ks-founder > .ks-text-link {
  grid-column: auto;
  justify-self: start;
  min-height: 44px;
  margin: 0;
  line-height: 1.45;
  white-space: normal;
}

/* Catalogs use two consistent columns; related-project sections keep theirs. */
[data-catalog] .ks-house-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
  align-items: stretch;
}
[data-catalog] .ks-house {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
[data-catalog] .ks-house-image {
  flex: none;
  width: 100%;
  aspect-ratio: 4 / 3;
}
[data-catalog] .ks-house-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 24px;
}
[data-catalog] .ks-house-facts {
  align-items: flex-start;
  gap: 7px;
  line-height: 1.4;
}
[data-catalog] .ks-house-facts span { max-width: 100%; }
[data-catalog] .ks-house h3 {
  min-height: 2.6em;
  margin-bottom: 0;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.3;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
[data-catalog] .ks-house-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  margin-top: 20px;
  padding-top: 16px;
}
[data-catalog] .ks-house-price > span {
  max-width: none;
  font-size: 12px;
  line-height: 1.45;
}
[data-catalog] .ks-house-price strong {
  font-size: clamp(25px, 2.5vw, 32px);
  line-height: 1.2;
  letter-spacing: -.035em;
  white-space: nowrap;
}
[data-catalog] .ks-house-body > .ks-text-link {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  padding-top: 16px;
  padding-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
}
[data-catalog] .ks-house-body > .ks-text-link > span { flex: none; }
[data-catalog] .ks-compare-add {
  float: none;
  align-self: stretch;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 0;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

@media (max-width: 1100px) {
  .ks-founder.ks-wrap {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px 32px;
  }
  .ks-founder .ks-founder-years { grid-row: 1 / 3; }
  .ks-founder > .ks-text-link { grid-column: 2; }
}

@media (max-width: 767px) {
  .ks-founder.ks-wrap {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px 26px;
    padding-block: 36px;
  }
  .ks-founder-years strong { font-size: 92px; }
  .ks-founder-years span { font-size: 15px; }
  [data-catalog] .ks-house-grid { gap: 22px 16px; }
  [data-catalog] .ks-house-body { padding: 18px; }
  [data-catalog] .ks-house h3 { font-size: 20px; }
}

@media (max-width: 599px) {
  .ks-founder.ks-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-block: 34px;
  }
  .ks-founder .ks-founder-years {
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
  }
  .ks-founder-years strong { font-size: 88px; }
  .ks-founder-years span { font-size: 16px; }
  .ks-founder > .ks-text-link { grid-column: 1; }
  .ks-founder h2 { font-size: 29px; }
  .ks-founder p:not(.ks-eyebrow) { font-size: 15px; line-height: 1.65; }
  .ks-founder small { display: block; font-size: 12px; line-height: 1.5; }
  [data-catalog] .ks-house-grid { gap: 20px 12px; }
  [data-catalog] .ks-house { border-radius: 12px; }
  [data-catalog] .ks-house-image { border-radius: 12px 12px 0 0; }
  [data-catalog] .ks-house-body { padding: 12px; }
  [data-catalog] .ks-house-facts {
    gap: 5px;
    margin-bottom: 12px;
    font-size: 10.5px;
  }
  [data-catalog] .ks-house-facts span { padding: 4px 5px; }
  [data-catalog] .ks-house h3 {
    font-size: clamp(15px, 3.5vw, 19px);
    min-height: 3.9em;
    line-height: 1.3;
  }
  [data-catalog] .ks-house-price { gap: 4px; margin-top: 14px; padding-top: 12px; }
  [data-catalog] .ks-house-price > span { font-size: 11px; }
  [data-catalog] .ks-house-price strong {
    font-size: clamp(19px, 4.7vw, 25px);
    letter-spacing: -.03em;
  }
  [data-catalog] .ks-price-date { font-size: 10.5px; line-height: 1.5; }
  [data-catalog] .ks-house-body > .ks-text-link {
    gap: 5px;
    min-height: 52px;
    font-size: 12px;
    padding-top: 14px;
  }
  [data-catalog] .ks-compare-add { font-size: 12px; }
  [data-catalog] .ks-image-arrow { width: 27px; height: 27px; right: 8px; bottom: 8px; }
  [data-catalog] .v7-render-tag { top: 7px; left: 7px; padding: 3px 5px; font-size: 8.5px; }
}

/* A 320px phone cannot hold two useful, fully priced product cards. */
@media (max-width: 359px) {
  .ks-founder-years strong { font-size: 80px; }
  .ks-founder-years span { font-size: 15px; }
  .ks-founder .ks-founder-years { gap: 20px; }
  .ks-founder h2 { font-size: 27px; }
  [data-catalog] .ks-house-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  [data-catalog] .ks-house-body { padding: 19px; }
  [data-catalog] .ks-house-facts { font-size: 12px; gap: 7px; }
  [data-catalog] .ks-house h3 { font-size: 21px; min-height: 0; }
  [data-catalog] .ks-house-price strong { font-size: 27px; }
  [data-catalog] .ks-house-body > .ks-text-link { font-size: 14px; }
  [data-catalog] .ks-compare-add { font-size: 13px; }
  [data-catalog] .ks-price-date { font-size: 11px; }
  [data-catalog] .v7-render-tag { font-size: 10px; top: 11px; left: 11px; }
}
