/* Sunny Days — page-level layout for the homepage.
   Tokens: sd-tokens.css. Components: design-system.css. A11y: a11y.css.
   Kept small on purpose; anything reusable belongs in design-system.css. */

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
}

.sd-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 34px);
  min-width: 0;
}

/* Masthead */
.sd-head { padding: 22px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

/* Filter bar. `flex-wrap` plus min-width:0 on the fields is what keeps this
   inside a 390px viewport; overflow alone would not. */
.sd-controls { padding: clamp(14px, 2.4vw, 20px); margin-bottom: 20px; }
.sd-controls__grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; min-width: 0; }
.sd-controls__grid > .sd-field { flex: 1 1 165px; }
.sd-controls__spacer { margin-left: auto; }

/* Toolbar above the results */
.sd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sd-toolbar__note { font-size: 12px; color: var(--ink-faint); flex: 1 1 220px; min-width: 0; }

/* Results grid */
.sd-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); min-width: 0; }
.sd-grid > * { min-width: 0; }
.sd-grid__msg { grid-column: 1 / -1; text-align: center; padding: 56px 12px; color: var(--ink-soft); font-size: 14px; }

.sd-foot {
  margin-top: 40px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--hairline);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-faint);
  text-align: center;
}

.sd-foot a { color: var(--sun-deep); }

@media (max-width: 520px) {
  .sd-grid { grid-template-columns: 1fr; gap: 14px; }
  .sd-controls__grid > .sd-field { flex: 1 1 100%; }
  .sd-controls__spacer { margin-left: 0; }
}
