/* The feature section (spots/features.js): rounded tiles, each one feature with a small demo, then a plain spec list
   and the questions. Colors, type and radii are the app's tokens (/home/tokens.css); the few colors only a demo uses
   (the map, the lidar points) live in that tile's own CSS as the app's own values. */

.ft-head { max-width: 720px; }
.ft-head .t-lede { margin-top: var(--space-2); }

/* ---------- the grid: six columns, wide tiles take four, the rest two ---------- */
.ft-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px;
  margin: var(--space-6) 0 0; padding: 0; list-style: none;
}
.ft-tile {
  grid-column: span 2; position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 28px 28px 24px; border-radius: var(--r-sheet); background: var(--gw-bg-cell); color: var(--gw-ink);
  overflow: hidden; isolation: isolate;
}
.ft-tile.is-wide { grid-column: span 4; }
.ft-copy h3 {
  font-size: var(--fs-title3); line-height: var(--lh-title3); font-weight: var(--fw-semibold);
  letter-spacing: var(--track-title); text-wrap: balance;
}
.ft-copy p {
  margin-top: 6px; max-width: 46ch; font-size: var(--fs-callout); line-height: 1.45; letter-spacing: var(--track-callout);
  color: var(--gw-mute); text-wrap: pretty;
}
.ft-tile.is-wide .ft-copy p { max-width: 64ch; }
.ft-demo { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; margin-top: var(--space-3); }
.ft-note {
  margin-top: var(--space-2); font-size: var(--fs-footnote); line-height: var(--lh-footnote); letter-spacing: var(--track-footnote);
  color: var(--gw-mute); text-wrap: pretty;
}

/* the square tiles are about as tall as they are wide; the wide ones set their row's height */
.ft-tile:not(.is-wide) .ft-demo { min-height: 260px; }

/* ---------- narrower windows ---------- */
@media (max-width: 1000px) {
  .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ft-tile, .ft-tile.is-wide { grid-column: span 1; }
  .ft-tile.is-wide, .ft-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ft-grid { grid-template-columns: minmax(0, 1fr); }
  .ft-tile { padding: 22px 20px 20px; border-radius: 24px; }
}

/* the sun tile's first frame, in place before its demo loads (and without scripts) */
.ft-poster { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--r-group); object-fit: cover; }

/* until the sun and cost tiles mount, their demos keep the room the mounted demos take (the sun's readout and
   controls under the picture, the cost list), so a jump down the page doesn't push the content below when they load */
@media (scripting: enabled) {
  .ft-tile[data-ft="sun"]:not(.is-mounted) .ft-demo { padding-bottom: 121px; }
  .ft-tile[data-ft="cost"]:not(.is-mounted) .ft-demo { min-height: 487px; }
}
@media (scripting: enabled) and (max-width: 1000px) {
  .ft-tile[data-ft="cost"]:not(.is-mounted) .ft-demo { min-height: 479px; }
}
@media (scripting: enabled) and (max-width: 640px) {
  .ft-tile[data-ft="sun"]:not(.is-mounted) .ft-demo { padding-bottom: 153px; }
}
@media (scripting: enabled) and (max-width: 420px) {
  .ft-tile[data-ft="sun"]:not(.is-mounted) .ft-demo { padding-bottom: 205px; }
}
