/* Home (index.html): the hero, "Your progress" bars, the "New" list and spacing. Shapes and values from the
   Night Drive mockup (docs/design/v3-options/b/assets/site.css). Tiles, links and answer cards come from 03-blocks.css. */
@layer pages {
  /* ---------- hero: one picture, the heading on a dark fade, one line, the search ---------- */
  .hero { position: relative; height: 268px; overflow: hidden; }
  .hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
  .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 86%, transparent) 38%, transparent 78%); }
  .hero .wrap { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 14px; }
  .hero h1 { font-size: 44px; line-height: .95; margin: 0; }
  .hero .sub { color: #e9e5df; font-size: 16px; margin: 8px 0 14px; }
  .hero .search .btn-main { flex: none; }
  [data-page="home"] .hero-credit { margin-top: 2px; }

  /* ---------- Your progress: three short bars, each a link to its list ---------- */
  .hm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .hm-bars a { display: block; min-height: 44px; padding: 12px 14px; border-radius: var(--r2); background: var(--s1); color: var(--tx); text-decoration: none; }
  .hm-bar-t { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .hm-bar-t b { font: 800 20px/1 var(--disp); text-transform: uppercase; letter-spacing: .01em; }
  .hm-bar-t span { color: var(--mu); font-size: 14px; }
  .hm-bars .bar { display: block; }
  /* phone: with "Your progress" shown, the page keeps under four screens (section 8): the last two answers go */
  @media (max-width: 899px) {
    .hm-bars { gap: 6px; }
    .hm-bars a { padding: 10px 14px; }
    .hm-progress:not([hidden]) ~ #ask .qa:nth-child(n+5) { display: none; }
  }

  /* ---------- New: picture, title, date ---------- */
  .news { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
  .news a { display: flex; gap: 14px; align-items: center; padding: 8px 0; color: var(--tx); text-decoration: none; }
  .news img { width: 96px; height: 60px; border-radius: 10px; object-fit: cover; flex: none; }
  .news span { min-width: 0; }
  .news b { display: block; font-size: 16px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
  .news small { display: block; color: var(--mu); font-size: 13px; margin-top: 4px; }
  .news a:hover b { color: var(--ac); }

  @media (min-width: 900px) {
    .hero { height: 470px; }
    .hero::after { background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 40%, transparent 70%), linear-gradient(to right, color-mix(in srgb, var(--bg) 75%, transparent), transparent 60%); }
    .hero .wrap { padding-bottom: 44px; }
    .hero h1 { font-size: 96px; }
    .hero .sub { font-size: 19px; margin: 14px 0 24px; }
    .hero .search { max-width: 580px; min-height: 60px; }
    .hero .search input { font-size: 17px; }
    .hm-bars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .news { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
    .news a { flex-direction: column; align-items: stretch; padding: 0; }
    .news img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; }
    .news b { font-size: 18px; margin-top: 4px; }
  }
}
