/* Type shell extras on top of locked D-calm2 + Town CSS. Bar, Filter, sheet, rows unchanged
   except the two TY-A lock fixes below (placeholder text, 390 breadcrumb). */

/* Town subheads under a date group (kept from the typography mockup; TY-A does not use them). */
.ty-townh {
  margin: 18px 0 0;
  padding: 8px 0 4px;
  border-top: 1px solid var(--ink);
  font: 700 13px/1.15 "Barlow Condensed", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
}
.ty-townh:first-child,
.twd-list > .ty-townh:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
.ty-townh .n {
  font-weight: 600;
  margin-left: 4px;
}

@media (min-width: 900px) {
  .twd-list .ty-townh { grid-column: 1 / -1; }
}

/* Sparse type pages are short; keep the same bar and sheet. */
.ty-sparse .twd-sec-weekend .twd-list { }

/* ---------- TY-A lock fix 1: placeholder type word is plain muted text, not a link.
   The square sits inside <a class="twd-thumb">, so a:link color and the anchor's
   underline were showing through .twd-noimg (same markup as Town / D-calm2).
   Match the intended This weekend / Town treatment: mute, no underline, no blue. */
a.twd-thumb,
a.twd-thumb:link,
a.twd-thumb:visited,
a.twd-thumb:hover,
a.twd-thumb:active {
  color: inherit;
  text-decoration: none;
}
a.twd-thumb .twd-noimg,
.twd-noimg {
  color: var(--mute);
  text-decoration: none;
}

/* Keep the last diamond with the last crumb so they wrap as one unit at 390. */
nav.mock-bottom-nav .trail-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ---------- TY-A lock fix 2: at 390 the breadcrumb wraps on crumb boundaries
   so no word is cut off (Concert was clipping to "Co", Gun show to "Gun"). */
@media (max-width: 599px) {
  nav.mock-bottom-nav.fg-top-nav {
    white-space: normal;
    align-items: center;
  }
  nav.mock-bottom-nav .trail-scroll {
    overflow-x: visible;
    overflow-y: visible;
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 2px;
  }
  nav.mock-bottom-nav .trail-scroll a,
  nav.mock-bottom-nav .trail-scroll .fg-top-nav-dia,
  nav.mock-bottom-nav .trail-scroll .fg-top-nav-here {
    flex-shrink: 0;
  }

  /* TY-A lock: reserve the two-line trail at the bottom of the viewport so it
     never covers a card, including the last card at scroll 0 and at the end.
     Content scrolls in .ty-scroll; the trail sits in flow under that padding. */
  html, body { height: 100%; }
  body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: 0;
    overflow: hidden;
  }
  .ty-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-bottom: 24px;
  }
  .ty-a-final .twd-sec { margin-top: 16px; }
  nav.mock-bottom-nav.fg-top-nav {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    flex: 0 0 auto;
    width: 100%;
  }
  html.tc-lock .ty-scroll { overflow: hidden; }
}

/* ---------- TY-A lock: at 1280 every section uses the same full-width card row
   (Town T-final dated row: time rail | body | thumb+Details on the right).
   Overrides Town's 4-col This weekend grid and 2-col later-month grid, which
   squeezed Type list rows, ran type+town under Details, and clipped hours. */
@media (min-width: 900px) {
  .ty-a-final .twd-list,
  .ty-a-final .twd-sec .twd-list,
  .ty-a-final .twd-sec-weekend .twd-list,
  .ty-a-final .twd-sec-nov .twd-list,
  .ty-a-final .twd-sec-still .twd-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .ty-a-final .twd-row,
  .ty-a-final .twd-row.twd-dated,
  .ty-a-final .twd-row.twd-still,
  .ty-a-final .twd-sec-weekend .twd-row,
  .ty-a-final .twd-sec-still .twd-row,
  .ty-a-final .twd-sec-still .twd-row.twd-still {
    grid-template-columns: 88px minmax(0, 1fr) 96px;
    grid-template-areas: "rail body side";
  }
  .ty-a-final .twd-hours {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }
}
