/* ==========================================================================
   Yonge St Daily - header, navigation, footer
   Must load AFTER main.css.
   ========================================================================== */

/* 1. Top strip ----------------------------------------------------------- */

.ysd-topstrip {
  background: var(--ysd-ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  display: none;
}

@media (min-width: 900px) { .ysd-topstrip { display: block; } }

.ysd-topstrip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ysd-s5);
  min-height: 34px;
}

.ysd-topstrip a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.ysd-topstrip a:hover { color: var(--ysd-paper); }

.ysd-topstrip__links { display: flex; gap: var(--ysd-s4); }

.ysd-topstrip__date { color: rgba(255, 255, 255, 0.55); }

/* 2. Header shell -------------------------------------------------------- */

.ysd-site-header {
  background: var(--ysd-paper);
  border-bottom: var(--ysd-hair);
  position: sticky;
  top: 0;
  z-index: 90;
}

.admin-bar .ysd-site-header { top: 32px; }

@media (max-width: 782px) { .admin-bar .ysd-site-header { top: 46px; } }

.ysd-header__inner {
  display: flex;
  align-items: center;
  gap: var(--ysd-s5);
  min-height: var(--ysd-header-h);
}

/* 3. Wordmark ------------------------------------------------------------ */

.ysd-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--ysd-s3);
  text-decoration: none;
  flex: 0 0 auto;
  margin-right: auto;
}

.ysd-brand__mark {
  width: 26px;
  height: 26px;
  border-radius: var(--ysd-radius-sm);
  background: var(--ysd-red);
  position: relative;
  flex: 0 0 auto;
}

.ysd-brand__mark::before {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  top: 8px;
  height: 3px;
  background: var(--ysd-paper);
}

.ysd-brand__mark::after {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 6px;
  height: 6px;
  border: 2px solid var(--ysd-paper);
  border-radius: 1px;
}

.ysd-brand__text {
  font-family: var(--ysd-font-display);
  font-weight: 800;
  font-size: 1.3125rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ysd-ink);
  white-space: nowrap;
}

.ysd-brand__text em { font-style: normal; color: var(--ysd-red); }

.ysd-brand img { max-height: 38px; width: auto; }

.ysd-brand__tagline {
  display: none;
  font-size: 0.75rem;
  color: var(--ysd-slate);
  border-left: var(--ysd-hair);
  padding-left: var(--ysd-s3);
  margin-left: var(--ysd-s1);
  max-width: 15rem;
  line-height: 1.3;
}

@media (min-width: 1100px) { .ysd-brand__tagline { display: block; } }

/* 4. Primary navigation -------------------------------------------------- */

.ysd-nav { flex: 0 1 auto; }

.ysd-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--ysd-s5);
}

.ysd-nav li { position: relative; }

.ysd-nav a {
  font-family: var(--ysd-font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ysd-ink);
  text-decoration: none;
  padding-block: 6px;
  display: inline-block;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.ysd-nav a:hover { color: var(--ysd-red); }

.ysd-nav .current-menu-item > a,
.ysd-nav .current-menu-parent > a,
.ysd-nav .current-menu-ancestor > a { border-bottom-color: var(--ysd-red); }

/* Sub menus, CSS only */

.ysd-nav .sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  background: var(--ysd-paper);
  border: var(--ysd-hair);
  border-radius: var(--ysd-radius);
  padding: var(--ysd-s2);
  display: block;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
  z-index: 95;
}

.ysd-nav li:hover > .sub-menu,
.ysd-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ysd-nav .sub-menu a {
  display: block;
  padding: 8px 10px;
  border-bottom: 0;
  border-radius: var(--ysd-radius-sm);
  font-weight: 500;
}

.ysd-nav .sub-menu a:hover { background: var(--ysd-bone); }

/* 5. Header actions ------------------------------------------------------ */

.ysd-header__actions {
  display: flex;
  align-items: center;
  gap: var(--ysd-s3);
  flex: 0 0 auto;
}

.ysd-header__cta {
  padding: 9px 16px;
  font-size: 0.875rem;
  border-radius: var(--ysd-radius);
  background: var(--ysd-red);
  color: var(--ysd-paper);
  font-family: var(--ysd-font-display);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ysd-header__cta:hover { background: var(--ysd-red-dark); color: var(--ysd-paper); }

.ysd-header__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: var(--ysd-hair);
  border-radius: var(--ysd-radius);
  color: var(--ysd-ink);
  text-decoration: none;
}

.ysd-header__search:hover { border-color: var(--ysd-ink); }

.ysd-header__search svg { width: 16px; height: 16px; }

/* 6. Mobile menu, no JavaScript ------------------------------------------ */

.ysd-menu-toggle { display: none; }

.ysd-menu-label {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  border: var(--ysd-hair);
  border-radius: var(--ysd-radius);
  cursor: pointer;
  flex: 0 0 auto;
}

.ysd-menu-label span,
.ysd-menu-label span::before,
.ysd-menu-label span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ysd-ink);
  position: relative;
}

.ysd-menu-label span::before,
.ysd-menu-label span::after {
  content: '';
  position: absolute;
  left: 0;
}

.ysd-menu-label span::before { top: -6px; }
.ysd-menu-label span::after { top: 6px; }

@media (max-width: 1023px) {
  .ysd-menu-label { display: inline-flex; }

  .ysd-header__inner { flex-wrap: wrap; }

  .ysd-nav {
    flex: 1 0 100%;
    order: 5;
    display: none;
    border-top: var(--ysd-hair);
    margin-inline: calc(var(--ysd-gutter) * -1);
    padding-inline: var(--ysd-gutter);
  }

  .ysd-menu-toggle:checked ~ .ysd-nav { display: block; }

  .ysd-nav ul { flex-direction: column; align-items: stretch; gap: 0; }

  .ysd-nav > ul > li { border-bottom: var(--ysd-hair); }
  .ysd-nav > ul > li:last-child { border-bottom: 0; }

  .ysd-nav a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 0;
  }

  .ysd-nav .current-menu-item > a { color: var(--ysd-red); }

  .ysd-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    padding: 0 0 var(--ysd-s3) var(--ysd-s4);
    min-width: 0;
  }

  .ysd-brand__text { font-size: 1.1875rem; }

  .ysd-header__cta { padding: 8px 13px; font-size: 0.8125rem; }
}

@media (max-width: 420px) {
  .ysd-header__search { display: none; }
}

/* Max Mega Menu takes over the primary location when it is configured.
   Keep our shell out of its way. */
.ysd-nav .mega-menu-wrap { width: 100%; }

/* 7. Category rail ------------------------------------------------------- */

.ysd-rail {
  background: var(--ysd-paper);
  border-bottom: var(--ysd-hair);
  overflow-x: auto;
  scrollbar-width: none;
}

.ysd-rail::-webkit-scrollbar { display: none; }

.ysd-rail__inner {
  display: flex;
  gap: var(--ysd-s5);
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

.ysd-rail a {
  font-family: var(--ysd-font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ysd-graphite);
  text-decoration: none;
}

.ysd-rail a:hover { color: var(--ysd-red); }

.ysd-rail a.is-current { color: var(--ysd-red); }

/* 8. Footer -------------------------------------------------------------- */

.ysd-site-footer {
  background: var(--ysd-ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
}

.ysd-site-footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.ysd-site-footer a:hover { color: var(--ysd-paper); }

.ysd-footer__grid {
  display: grid;
  gap: var(--ysd-s6) var(--ysd-s5);
  grid-template-columns: 1fr;
  padding-block: var(--ysd-s7);
}

@media (min-width: 640px) { .ysd-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (min-width: 1000px) {
  .ysd-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: var(--ysd-s7); }
}

.ysd-footer__brand .ysd-brand__text { color: var(--ysd-paper); }

.ysd-footer__blurb {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin: var(--ysd-s4) 0 0;
  max-width: 26rem;
}

.ysd-footer__heading {
  font-family: var(--ysd-font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: var(--ysd-track-up);
  text-transform: uppercase;
  color: var(--ysd-paper);
  margin: 0 0 var(--ysd-s4);
}

.ysd-footer__list { list-style: none; margin: 0; padding: 0; }
.ysd-footer__list li { margin-bottom: var(--ysd-s3); line-height: 1.4; }

.ysd-footer__social { display: flex; gap: var(--ysd-s3); margin-top: var(--ysd-s4); }

.ysd-footer__social a {
  border: var(--ysd-hair-dark);
  border-radius: var(--ysd-radius-sm);
  padding: 7px 12px;
  font-size: 0.8125rem;
}

.ysd-footer__social a:hover { border-color: rgba(255, 255, 255, 0.5); }

.ysd-footer__bottom {
  border-top: var(--ysd-hair-dark);
  padding-block: var(--ysd-s5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ysd-s3) var(--ysd-s5);
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.ysd-footer__legal { display: flex; flex-wrap: wrap; gap: var(--ysd-s4); }

.ysd-footer__note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  max-width: 40rem;
  line-height: 1.5;
  padding-bottom: var(--ysd-s5);
}

/* Newsletter form in the footer */

.ysd-footer__signup { display: flex; gap: var(--ysd-s2); margin-top: var(--ysd-s4); }

.ysd-footer__signup input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: var(--ysd-hair-dark);
  border-radius: var(--ysd-radius-sm);
  padding: 10px 12px;
  color: var(--ysd-paper);
  font-size: 0.9375rem;
}

.ysd-footer__signup input::placeholder { color: rgba(255, 255, 255, 0.4); }

/* ==========================================================================
   9. Corrections
   header.css loads after main.css, so the footer link colour was winning over
   the button's own colour and rendering a white button with white text on a
   white fill. Buttons keep their own colour everywhere.
   ========================================================================== */

.ysd-site-footer .ysd-btn,
.ysd-site-footer .ysd-btn:link,
.ysd-site-footer .ysd-btn:visited,
.ysd-signup--footer .ysd-btn,
.ysd-signup--footer .ysd-btn:link,
.ysd-signup--footer .ysd-btn:visited,
.ysd-signup--end .ysd-btn,
.ysd-signup--end .ysd-btn:link,
.ysd-signup--end .ysd-btn:visited {
  color: var(--ysd-paper);
}

.ysd-site-footer .ysd-btn--light,
.ysd-site-footer .ysd-btn--light:link,
.ysd-site-footer .ysd-btn--light:visited,
.ysd-site-footer .ysd-btn--light:hover,
.ysd-signup--footer .ysd-btn--light,
.ysd-signup--footer .ysd-btn--light:link,
.ysd-signup--footer .ysd-btn--light:visited,
.ysd-signup--footer .ysd-btn--light:hover,
.ysd-signup--end .ysd-btn--light,
.ysd-signup--end .ysd-btn--light:link,
.ysd-signup--end .ysd-btn--light:visited,
.ysd-signup--end .ysd-btn--light:hover {
  color: var(--ysd-ink);
  background: var(--ysd-paper);
  border-color: var(--ysd-paper);
}

/* The footer note sat at 3.84:1. Lift it over AA. */
.ysd-site-footer .ysd-footer__note { color: rgba(255, 255, 255, 0.76); }

.ysd-site-footer .ysd-footer__bottom { color: rgba(255, 255, 255, 0.76); }
